Jump to content

enable and disable row in mysql table using a html button


hance2105

Recommended Posts

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.