sqlite_last_insert_rowid

mIRC SQLite

sqlite_last_insert_rowid
Returns the row id of the most recently inserted row.
Syntax
$sqlite_last_insert_rowid ( conn )
Parameters
conn
The connection identifier.
Return Value
The row id on success, or $null if there was an error.
Example
; This code assumes a connection is already established and stored in %db
var %sql = INSERT INTO publishers (publisher) VALUES ('Square Enix')
if ($sqlite_exec(%db, %sql)) {
  echo -a Insrted row id: $sqlite_last_insert_rowid(%db)
  sqlite_free %res
}
else {
  echo -a Error executing query: %sqlite_errstr
}