ianp Posted August 19, 2012 Share Posted August 19, 2012 I have this: UPDATE servers SET votes=+1 WHERE id='$sid' for sql but when I run it the votes just sets to one. How can I make it so the votes go up and add to the current value. Quote Link to comment https://forums.phpfreaks.com/topic/267315-add-1-to-field-in-row/ Share on other sites More sharing options...
MMDE Posted August 19, 2012 Share Posted August 19, 2012 I have this: UPDATE servers SET votes=+1 WHERE id='$sid' for sql but when I run it the votes just sets to one. How can I make it so the votes go up and add to the current value. UPDATE servers SET votes=votes+1 WHERE id='$sid' Quote Link to comment https://forums.phpfreaks.com/topic/267315-add-1-to-field-in-row/#findComment-1370732 Share on other sites More sharing options...
ianp Posted August 19, 2012 Author Share Posted August 19, 2012 thank you! Quote Link to comment https://forums.phpfreaks.com/topic/267315-add-1-to-field-in-row/#findComment-1370733 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.