title: PDO how to get auto_increment value from a table
body: <p>I am creating a calendar in php and grabbing events from a database. We also have to insert events using prepared PDO statements. I can successfully create the new event and insert it into an event table. I also have to link and event with a family member.</p>
  
  <pre><code>$stmt = $handle-&gt;prepare("INSERT INTO events(name, description, starthour, meridian, eventdate)
    VALUES(:name, :description, :starthour, :meridian, :eventdate)");
  $stmt-&gt;execute(array(
      "name" =&gt; $name,
      "description" =&gt; $description,
      "starthour" =&gt; "$starthour",
      "meridian" =&gt; "$meridian",
      "eventdate" =&gt; "$eventdate"
   ));
  
  $stmt1 = $handle-&gt;prepare("INSERT INTO familymemberevents(familymemberID,eventID)
      VALUES(:familymemberID, :eventID)");
  $stmt1-&gt;execute(array(
      "familymemberID" =&gt; $familymemberid,
      "eventID" =&gt; 
  ));
  </code></pre>
  
  <p>eventID auto-increments. Is there anyway I can get this number from the database?
  Thanks in advance! </p>