title: PDO lastInsertId does not work on transactions?
body: <p>I am using PDO for the first time with MySQL, just playing with it at the moment.  </p>
  
  <p>So far when I try to do an insert wrapped in transactions... </p>
  
  <pre><code>$this-&gt;dbh-&gt;beginTransaction();
  // $sql query ran
  $this-&gt;dbh-&gt;commit();
  
  echo $this-&gt;dbh-&gt;lastInsertId();
  </code></pre>
  
  <p>lastInsertId() is returning 0...when I run the same query outside of a transaction, I get the proper id number returned.  Is there something I am missing here?</p>