mysql obtient le dernier identifiant
SELECT MAX(id) FROM tablename;
Fine Fox
SELECT MAX(id) FROM tablename;
SELECT MAX(id) AS last_id FROM users
-- last_id --
-- 33 --
-- To get the last inserted auto-increment row ID: --
SELECT LAST_INSERT_ID( optional_expression )
-- If you have just inserted it using a command in C# use: --
int lastId = (Int32)yourCommand.LastInsertedId;
//laravel controller
$newOrder = new Order();
...
...
$newOrder->save();
$last_id = $newOrder->id;
//You need to use this in OpenCart for getting last insert id:
$this->db->getLastId()