public int | boolean lastInsertId ([string $sequenceName])
Returns the insert id for the auto_increment/serial column inserted in the lastest executed SQL statement
//Inserting a new robot
$success = $connection->insert(
"robots",
array("Astro Boy", 1952),
array("name", "year")
);
//Getting the generated id
$id = $connection->lastInsertId();