title: Getting last inserted index mysql
body: <p>I am using ADODB to connect to my database.
  After I submit the query I want to get the ID of the last inserted row (from the query just inserted).</p>
  
  <p>ADODB has an Insert_ID() function that should retrieve this is but it is not...<br/>
  <code>db-&gt;Insert_ID()</code> <br/>
  is not working, neither is <br/>
  <code>db-&gt;Insert_ID($table, $key)</code> <br/></p>
  
  <p>They both just return empty values.
  I doubled checked my table and the insert statement is indeed working, a new row is being put in, and the key is auto_increment.  Am I using the Insert_ID wrong or is there a better way to retrieve the key of the last row inserted?</p>
  
  <p>Thanks</p>
  
  <p>Edit: Adding code</p>
  
  <pre><code>    $result = \PSU::db-&gt;Execute( $updateSQL, $values_array );
      $id = \PSU::db-&gt;Insert_ID();
      // $id = \PSU::db-&gt;Insert_ID( $table, $key );
  </code></pre>
  
  <p>\PSU::db is our ADODB implementation class, taking care of things like connecting, disconnecting, etc.</p>