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. Quote Link to comment 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] Quote Link to comment Share on other sites More sharing options...
digitalgod Posted September 14, 2006 Author Share Posted September 14, 2006 thanks, works perfectly Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.