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

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -