
August 3rd, 2008, 09:45 PM
|
|
|
|
Add value to existing field with one query
I want to add a value to a value that is already in the DB.
For example sake this is what I would like to do:
$ValueToAddToDB = 4
UPDATE mytable SET field=add($ValueToAddToDB) WHERE id=555
So in the above example, if "field was already 100, it would now be 104 after the update ran.
Is there a mySQL function like add or sum?
|