Thread: +1 in mysql ?
View Single Post
Old 09-01-2008, 02:14 PM   #1 (permalink)
boycoda
The Wanderer
 
Join Date: Mar 2008
Location: United Kingdom
Posts: 22
Thanks: 1
boycoda is on a distinguished road
Default +1 in mysql ?

Hello everyone,

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.

So say,

$age = $row['age'];



$agesplus = $newage;

$newage would be 5, but how would it do that?
Send a message via MSN to boycoda Send a message via Skype™ to boycoda
boycoda is offline  
Reply With Quote