digitalgod Posted September 14, 2006 Share Posted September 14, 2006 Hey guys,would it be possible to add a number to a value in a row just by using mysql?so say I have a value of 0 in 'email' and every time I click on a buttonit adds 1 to the existing value. I know how to do that with php but it seems a waste of ressources grabbing the current value from the table, adding 1 to it and then updating the table. Link to comment https://forums.phpfreaks.com/topic/20792-operators-solved/ Share on other sites More sharing options...
shoz Posted September 14, 2006 Share Posted September 14, 2006 [code]UPDATE tablename SET column = column + 1[/code] Link to comment https://forums.phpfreaks.com/topic/20792-operators-solved/#findComment-92042 Share on other sites More sharing options...
digitalgod Posted September 14, 2006 Author Share Posted September 14, 2006 thanks, works perfectly Link to comment https://forums.phpfreaks.com/topic/20792-operators-solved/#findComment-92047 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.