diff options
Diffstat (limited to 'lib/db.php')
-rw-r--r-- | lib/db.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/db.php b/lib/db.php index 3ccd51737ae..903f76c8c04 100644 --- a/lib/db.php +++ b/lib/db.php @@ -404,6 +404,13 @@ class OC_DB { $query = self::prepare('SELECT lastval() AS id'); $row = $query->execute()->fetchRow(); return $row['id']; + } + if( $type == 'mssql' ) { + if($table !== null) { + $prefix = OC_Config::getValue( "dbtableprefix", "oc_" ); + $table = str_replace( '*PREFIX*', $prefix, $table ); + } + return self::$connection->lastInsertId($table); }else{ if($table !== null) { $prefix = OC_Config::getValue( "dbtableprefix", "oc_" ); |