Skip to content

Commit

Permalink
Add name parameter for getLastInsertID()
Browse files Browse the repository at this point in the history
  • Loading branch information
yidas committed Jun 10, 2019
1 parent 459919d commit 711e8f3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 711e8f3

Please sign in to comment.