Commit 12e69845 authored by Josh Campbell's avatar Josh Campbell

Merge pull request #2 from teo-sk/patch-1

added method to get last insert id
parents 5019f88f 2b544029
...@@ -222,6 +222,17 @@ class MysqliDB { ...@@ -222,6 +222,17 @@ class MysqliDB {
return $this; return $this;
} }
/**
* This methods returns the ID of the last inserted item
*
* @return integer The last inserted item ID.
*/
public function getInsertId()
{
return $this->_mysqli->insert_id;
}
/** /**
* This method is needed for prepared statements. They require * This method is needed for prepared statements. They require
* the data type of the field to be bound with "i" s", etc. * the data type of the field to be bound with "i" s", etc.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment