Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Get last insert ID

edited October 2010 in Vanilla 2.0 - 2.8
I made a request to insert the values into a table using the

$SQL = Gdn::SQL(); $SQL->Insert('Table', array('Field' => $var))

How can I get the last insert ID using the methods of framework Vanilla?
Thanks!
Tagged:

Comments

  • SS ✭✭
    edited October 2010
    Simple.
    SQL.Insert() returns last insert id.
    $LastInsertID = $SQL->Insert('Table', array('Field' => $var));
Sign In or Register to comment.