title: How to judge whether or not a transaction succeeded or failed?
body: <p>I'm using MySQL and PHP.</p>
  
  <p>Running this transaction:</p>
  
  <pre><code>begin;
  ....
  commit;
  </code></pre>
  
  <p>How should I judge whether it failed in PHP?</p>