learning_brain
New Member
- Messages
- 206
- Reaction score
- 1
- Points
- 0
Hi
This may seem simple but it not working for me.
I currently have the following:
All I want is to reduce each individual value by one less than the current stored value. Google doesn't seem to give me the answer!
What this statement is doing is taking the first value it finds and using that as the value to update all other fields with the same value... not good.
Do I really have to create a loop for this???????
There must be a simpler mySQL solution...
Rich
This may seem simple but it not working for me.
I currently have the following:
PHP:
UPDATE images SET POPULAR = POPULAR -1 WHERE POPULAR > 0
All I want is to reduce each individual value by one less than the current stored value. Google doesn't seem to give me the answer!
What this statement is doing is taking the first value it finds and using that as the value to update all other fields with the same value... not good.
Do I really have to create a loop for this???????
There must be a simpler mySQL solution...
Rich
Last edited: