version: 2.1.12
id
Return the ID for the last inserted row.
id($name)
name (optional) [string]
Returns a string representing the last value retrieved from the specified sequence object.
Return: [string] The last inserted row ID.
$database->insert("account", [ "user_name" => "foo", "email" => "foo@bar.com", "age" => 25 ]); $account_id = $database->id();
For Oracle
$database->insert("ACCOUNT", [ "NAME" => "foo" ], "ID"); $account_id = $database->id();