From 5ecebe211bce490aa776ad3f3cc9e8a5b2088b6f Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Sat, 2 Nov 2013 20:21:19 +0100 Subject: [PATCH] mssql: fixing lastInsertId() implementation --- lib/private/db/adaptersqlsrv.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/private/db/adaptersqlsrv.php b/lib/private/db/adaptersqlsrv.php index d0a67af28a..88fa2fc9f9 100644 --- a/lib/private/db/adaptersqlsrv.php +++ b/lib/private/db/adaptersqlsrv.php @@ -11,10 +11,8 @@ namespace OC\DB; class AdapterSQLSrv extends Adapter { public function lastInsertId($table) { - if($table !== null) { - $table = $this->conn->replaceTablePrefix( $table ); - } - return $this->conn->lastInsertId($table); + + return $this->conn->realLastInsertId($table); } public function fixupStatement($statement) {