title: PHP MySQL PDO lastInsertID causes fatal error
body: <p>I tried looking through some other posts, but didn't see anything exactly what I'm looking for.</p>
  
  <p>I have a DB query</p>
  
  <pre><code>$sql = "INSERT INTO groups(Name) VALUES (:name)";
  $dbs = $dbo-&gt;prepare($sql);
  
  $dbs-&gt;bindParam(":name", $_POST['name'], PDO::PARAM_STR);
  
  $dbs-&gt;execute();
  
  $groupID = $dbs-&gt;lastInsertId();
  </code></pre>
  
  <p>That returns this fatal error:</p>
  
  <pre><code>[Tue Dec 20 13:59:23 2011] [error] [client 127.0.0.1] PHP Fatal error:  Call to undefined method PDOStatement::lastInsertId() in /media/Storage/www/2011/admin/public/ajax.users.php on line 87, referer: http://localhost/2011/admin/public/menu.php?page=users
  </code></pre>
  
  <p>According to the php manual for PDO::lastInsertId():</p>
  
  <blockquote>
    <p>If the PDO driver does not support this capability, PDO::lastInsertId() triggers an IM001 SQLSTATE. </p>
  </blockquote>
  
  <p>How would I determine if my server supports lastInsertId()? I do not see IM001 in my error log anywhere.</p>
  
  <p>When I run this, the data is inserted fine, but I cannot get its ID to use in the next set of INSERT's that set the group permissions.</p>