title: Mysql transaction : commit and rollback
body: <p>I updated my PhpMyAdmin database engine from MyISAM to INNODB to allow rollback.</p>
  
  <p>This is my SQL query : </p>
  
  <pre><code>START TRANSACTION;
  UPDATE jkm_content SET state=0 WHERE title IN ('title-1','title2');
  </code></pre>
  
  <p>And the result : </p>
  
  <pre><code>start transaction;# MySQL returned an empty result set (i.e. zero
  rows).
  UPDATE jkm_content SET state=1 WHERE title IN ('title-1','title2');# 2 rows affected.
  </code></pre>
  
  <p>1) So the statement informs me that 2 rows are affected but the change doesn't appear anywhere (neither in my DB  nor in the website).I though <code>start transaction</code> would allow me to visualize the changes (in a temporary DB) and then if I am satisfy I "commit" the query. (I understand I need to <code>commit</code> to update the DB, but if I <code>commit</code> the change will be permanent). </p>
  
  <p>2) Then I don't get the point of <code>rollback</code>if I can't see the effect before committing it. What will be the difference between these two queries : </p>
  
  <pre><code>START TRANSACTION;
  UPDATE jkm_content SET state=0 WHERE title IN ('title-1','title2');
  </code></pre>
  
  <p>AND </p>
  
  <pre><code>START TRANSACTION;
  UPDATE jkm_content SET state=0 WHERE title IN ('title-1','title2');
  ROLLBACK;
  </code></pre>
  
  <p>3) if I got it right, these functions are all the same :</p>
  
  <pre><code>START TRANSACTION
  BEGIN
  BEGIN WORK
  </code></pre>