ReeceSayer Posted May 15, 2009 Share Posted May 15, 2009 Right i have a form which when a radio button is selected it inserts a number, 5, 10, 15 or 20 into my table... what i'm trying to do is make it so when an administrator runs a script it will subtract 1 from the value in this row for all fields in the table... thanks Quote Link to comment https://forums.phpfreaks.com/topic/158274-solved-update-table-value-to-subtract-1/ Share on other sites More sharing options...
Maq Posted May 15, 2009 Share Posted May 15, 2009 Do you mean all records for that field? You can do: UPDATE table SET field = field - 1 Quote Link to comment https://forums.phpfreaks.com/topic/158274-solved-update-table-value-to-subtract-1/#findComment-834789 Share on other sites More sharing options...
ReeceSayer Posted May 15, 2009 Author Share Posted May 15, 2009 yeah thats it worked perfectly thanks alot Quote Link to comment https://forums.phpfreaks.com/topic/158274-solved-update-table-value-to-subtract-1/#findComment-834791 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.