mysql - Deleting my data in my table but not in database -
I have a query I wanted to delete my data in my browser table, but I do not want to permanently delete it , I should just hide it. My problem is that I do not know what kind of inquiry I would need. Here is my delete query.
My table feild id name and flag are I want to do this when the flag is 1, it shows the table and if it is 0, then it will be hidden when the delete button is pressed.
function delete () {$ id = $ this- & gt; Input-> Find ('id'); $ SSQL = "Delete from table where id =?"; $ This- & gt; Db- & gt; Query ($ sSQL, array ($ id)); }
You can simply update the flag, and in your selected query only select < Code> Flag = 1 Try it out,
$ sSQL = "update tableclick set` flag '= 0 where id =?";; $ This- & gt; Db- & gt; Query ($ sSQL, array ($ id));
Comments
Post a Comment