Commit 2b544029 authored by Teo's avatar Teo

added method to get last insert id

parent 5019f88f
...@@ -221,6 +221,17 @@ class MysqliDB { ...@@ -221,6 +221,17 @@ class MysqliDB {
$this->_where[$whereProp] = $whereValue; $this->_where[$whereProp] = $whereValue;
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
......
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