![]() |
Cron not quite working
PHP Code:
|
PHP Code:
PHP Code:
|
PHP Code:
Sorry, it's suppose to be: PHP Code:
PHP Code:
PHP Code:
|
Well with $armyinfo on the second line it looks already much better to me.
|
well
PHP Code:
and PHP Code:
|
Well right now you are looping all rows in 'armysys'. Then for each row in that table, you are setting the values for all rows.
You should add a WHERE-clause to your UPDATE-statement, uniquely identifying the row you're working on. |
I need to update every row in the table indepedantly, not just some of them. This is why i don't have a where clause. Every hour the cron is suppose to give every member that is signed up (row in armysys) gold and also suppose to update their rank.
|
What is happening with your current script is:
1. A row (member) is read from armysys 2. With the information of this row, you do some calculations 3. ALL ROWS (members) are updated with the outcome of teh calculation performed for 1 member. 4. goto -> 1. You will need to use the memberid of the current row (for which you've done calculations) in the update WHERE-clause. The way you have it now, all members will get the outcome of the calculation of the last member when this script is finished. |
Sorry for my ignorance. I finally got it to work with:
PHP Code:
|
All times are GMT. The time now is 01:05 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|