From 711e8f3818f3205be9c9345097e54cca5e0173bb Mon Sep 17 00:00:00 2001 From: Nick Tsai Date: Mon, 10 Jun 2019 17:50:19 +0800 Subject: [PATCH] Add name parameter for getLastInsertID() --- src/Model.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Model.php b/src/Model.php index f097d80..c5dfcf3 100644 --- a/src/Model.php +++ b/src/Model.php @@ -675,11 +675,12 @@ public function batchInsert($data, $runValidation=true) /** * Get the insert ID number when performing database inserts. * + * @param string $name Name of the sequence object from which the ID should be returned. * @return integer Last insert ID */ - public function getLastInsertID() + public function getLastInsertID($name=null) { - return $this->getDB()->insert_id(); + return $this->getDB()->insert_id($name); } /**