So basically I have a tabular form. One of the columns is a checkbox, another column is called 'hidden' and will contain either the value 'yes' or 'no'.
I have a button for hiding rows, so the user should be able to select certain rows using the checkboxes, then click the hide button and it should change the rows that the user has selected to 'yes' under the 'hidden' column
So my SQL looks like this:
UPDATE nameOfTable
SET hidden = 'Yes'
WHERE hidden = 'No';
Obviously this will just update the 'hidden' column to 'yes' for all rows that are currently 'no' but how do I instead make it to just update the rows that user has selected using the checkboxes?
just pass the value of the primary key (id) selected y the user to the database query and compare it with the primary key field. and obviously the above answer by @SRIRAM will definitely work for you..!!