Get Started

Medoo 1.2

Where Syntax

Query

Fetch

Transaction

Advanced

PDO object

Debug

Information

version: 1.2.1

id

Returns the ID of the last inserted row

id()
Return: [number] The last inserted row ID.
You can use this function to check out the performed SQL queries for debug.
$database->insert("account", [
	"user_name" => "foo",
	"email" => "foo@bar.com",
	"age" => 25
]);

$account_id = $database->id();