+1 in mysql ?
Say for example I have a field in a mysql row, with the value of 4. Now I want to be able to update that value to 5 in php.
What would be the best way to do that?
Remember though, that it has to +1 on to the current mysql row field value. UPDATING a field is easy, but i've not done a +1 of value before.
$age = $row['age'];
$agesplus = $newage;
$newage would be 5, but how would it do that?
Here's what maZtah said but just with the plain old SQL:
Ah that's great, thanks.
|All times are GMT. The time now is 12:20 PM.|
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0