Using PDO method to get lastInsertId

This commit is contained in:
José Lorenzo Rodríguez 2010-10-16 09:34:29 -04:30
parent a5f3f95e3a
commit f772527445

View file

@ -313,12 +313,7 @@ class DboMysql extends DboSource {
* @return in
*/
function lastInsertId($source = null) {
$id = $this->fetchRow('SELECT LAST_INSERT_ID() AS insertID', false);
if ($id !== false && !empty($id) && !empty($id[0]) && isset($id[0]['insertID'])) {
return $id[0]['insertID'];
}
return null;
return $this->_connection->lastInsertId();
}
/**