[thelist] [mysql] + operator
Anthony Baratta
Anthony at Baratta.com
Sun Feb 2 18:58:00 CST 2003
At 04:34 PM 2/2/2003, Paul Bennett wrote:
>ok, I have a numeric field in a database and I want to update it with
>another numeric value, so the new data represents the total of the old
>plus the new:
>$sql = "update $tableName set hours=hours+'$newValue' where id='$id'
>limit 1";
Forgot to add, try removing the '' around your $newValue. It may be trying
to concatenate instead of add.
---
Anthony Baratta
President
Keyboard Jockeys
"Conformity is the refuge of the unimaginative."
More information about the thelist
mailing list