The state of these two row are set to 1. I want to set them to 0 and visualizing the result of a rollback
query .
This query does the job :
START TRANSACTION;
UPDATE jkm_content SET state=0 WHERE title IN ('001','002');
SELECT * FROM jkm_content WHERE title IN ('001','002');
-> The state of the rows outputted are set to 0
However, it's better to close the start transaction with ROLLBACK
but when my query is...
START TRANSACTION;
UPDATE jkm_content SET state=0 WHERE title IN ('258.txt','259.txt');
SELECT * FROM jkm_content WHERE title IN ('258.txt','259.txt');
ROLLBACK;
-> ... the state of the rows outputted are set to 1 (the current set not the start transaction
one! )
What should be my query to output state=0 even if I end my query with rollback
?