diff options
author | Robin Appelman <icewind1991@gmail.com> | 2010-06-11 17:58:23 +0200 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2010-06-11 18:09:34 +0200 |
commit | 02ad83b04d79079eac4e0783a83db32ed0dba88b (patch) | |
tree | 9cf892d2a78c7931115ca2d197d9e5df55b472e4 /inc | |
parent | df149217b9edea53cb95c9f189531ff483acc044 (diff) | |
download | nextcloud-server-02ad83b04d79079eac4e0783a83db32ed0dba88b.tar.gz nextcloud-server-02ad83b04d79079eac4e0783a83db32ed0dba88b.zip |
fix insertid in OC_DB
Diffstat (limited to 'inc')
-rwxr-xr-x | inc/lib_base.php | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/inc/lib_base.php b/inc/lib_base.php index 82f71191746..728b9acd018 100755 --- a/inc/lib_base.php +++ b/inc/lib_base.php @@ -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(); } /** |