Skip to content
Snippets Groups Projects
Commit 02ad83b0 authored by Robin Appelman's avatar Robin Appelman
Browse files

fix insertid in OC_DB

parent df149217
No related branches found
No related tags found
No related merge requests found
......@@ -426,12 +426,7 @@ class OC_DB {
* @return primarykey
*/
static function insertid() {
global $CONFIG_DBTYPE;
if($CONFIG_DBTYPE=='sqlite'){
return self::$DBConnection->lastInsertRowid();
}elseif($CONFIG_DBTYPE=='mysql'){
return(mysqli_insert_id(self::$DBConnection));
}
return self::$DBConnection->lastInsertID();
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment