Ads Posted June 20, 2010 Share Posted June 20, 2010 Is there a way to Reset a Database Field to its defualt value, using php? I want to be able to do this without Manually setting the number I want to field to update to? Quote Link to comment https://forums.phpfreaks.com/topic/205299-reset-databse-fields/ Share on other sites More sharing options...
PFMaBiSmAd Posted June 20, 2010 Share Posted June 20, 2010 Use the DEFAULT keyword - UPDATE table_reference SET col_name1=DEFAULT WHERE where_condition Quote Link to comment https://forums.phpfreaks.com/topic/205299-reset-databse-fields/#findComment-1074527 Share on other sites More sharing options...
Ads Posted June 20, 2010 Author Share Posted June 20, 2010 Worked Perfectly, Thanks Quote Link to comment https://forums.phpfreaks.com/topic/205299-reset-databse-fields/#findComment-1074535 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.