title: Reliable or not PDO lastInsertId() when using transactions
body: <p>I use PDO transaction</p>
  
  <pre><code>try {
      DB::$db-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
      DB::$db-&gt;beginTransaction();
  
      $db-&gt;prepare( insert query );
      $db-&gt;execute();
  
      $last_insert_id = $db-&gt;lastInsertId();
  
      ...
      ...
  </code></pre>
  
  <p>Multiple concurrent requests are expected on this script.</p>
  
  <p>Question: is it possible that <code>lastInsertId()</code> return incorrect value for the user, who actually inserted the row? </p>
  
  <p>(by "incorrect value" i mean:  id that is inserted by some other user).</p>