MysqlI Subtract

gojoe_gojoe

New Member
Why does this SQL Query not work correct\[code\]$sql = "UPDATE `purchases` SET `changes_left` = (`changes_left` - 1) WHERE `id` = ?";\[/code\]Currently changes_left is a int field with the value 3. But it set it to -2 after the executed query. Why does it subtract 5 insted of the 1?
 
Back
Top