hance2105 Posted June 4, 2013 Share Posted June 4, 2013 hello guys, can anyone let me have the codes for enabling and disabling a record in a database instead of deleting it? i dnt want to delete the record, i want to be able to disable it and re-enable it when i want i am searching around the web but still can't find the codes Quote Link to comment https://forums.phpfreaks.com/topic/278759-enable-and-disable-row-in-mysql-table-using-a-html-button/ Share on other sites More sharing options...
mikosiko Posted June 4, 2013 Share Posted June 4, 2013 every one around here try to HELP you with your code... therefore show what you have so far and where are you stuck... I'm guessing that you know how an UPDATE works right? Quote Link to comment https://forums.phpfreaks.com/topic/278759-enable-and-disable-row-in-mysql-table-using-a-html-button/#findComment-1434015 Share on other sites More sharing options...
mac_gyver Posted June 5, 2013 Share Posted June 5, 2013 you would need to add a column to the database table that would hold a status value that you would update to indicate if the row was to be included (enabled) or excluded (disabled) from query results. this might be a good time for you to learn about database 'views' as you can define one to only operate on records that have a status value indicating it is to be included/enabled in query results. Quote Link to comment https://forums.phpfreaks.com/topic/278759-enable-and-disable-row-in-mysql-table-using-a-html-button/#findComment-1434151 Share on other sites More sharing options...
Jessica Posted June 5, 2013 Share Posted June 5, 2013 Programming is not copying and pasting other people's "codes". Quote Link to comment https://forums.phpfreaks.com/topic/278759-enable-and-disable-row-in-mysql-table-using-a-html-button/#findComment-1434152 Share on other sites More sharing options...
ginerjm Posted June 5, 2013 Share Posted June 5, 2013 You said in your other post to come here and work on this one. Yet - you have already been given the answer yesterday. Run with it! (A pretty simple fix it is too - maybe you DO need to do some reading) Quote Link to comment https://forums.phpfreaks.com/topic/278759-enable-and-disable-row-in-mysql-table-using-a-html-button/#findComment-1434249 Share on other sites More sharing options...
Solution hance2105 Posted June 6, 2013 Author Solution Share Posted June 6, 2013 solved thnx for the help Quote Link to comment https://forums.phpfreaks.com/topic/278759-enable-and-disable-row-in-mysql-table-using-a-html-button/#findComment-1434442 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.