title: How to determine success of MySQL transaction
body: <p>In a regular single query statement to MySQL, I can use <code>mysql_affected_rows()==1</code> to determine whether or not something was updated. Now suppose I am trying to perform a transaction of the following:</p>
  
  <pre><code>USE myDB;
  START TRANSACTION;
  UPDATE members SET member_active=0 WHERE member_id = 53;
  UPDATE member_subscriptions SET subscription_active=0 WHERE member_id = 53;
  COMMIT;
  ROLLBACK;
  </code></pre>
  
  <p>Since I have those two update statements, should I could on a successful transaction being equivalent to <code>mysql_affected_rows()==2</code> ?</p>
  
  <p>OR, is there a better way I should be checking for success?</p>