Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
Again, in sql, the result of your operation depends of the field datatype.
If your column out is a varchar, you cannot use the db to make out+1, because 'something'+1='something1' (or an exception)
You can do that if your column is a numeric type, and in that case, you have to drop the single quotes, which denotes a varchar
Code:
UPDATE affiliates SET out = out+1
--and not
UPDATE affiliates SET out = 'out+1'
Now, if your field is in a text datatype, the best would be to convert it to integer.
__________________
Only a biker knows why a dog sticks his head out the window.
Last edited by tripy; 11-17-2009 at 12:01 PM..
|