diff options
author | Morris Jobke <morris.jobke@gmail.com> | 2013-07-31 00:03:29 -0700 |
---|---|---|
committer | Morris Jobke <morris.jobke@gmail.com> | 2013-07-31 00:03:29 -0700 |
commit | 50101a85a63f29c47abe325aecb3af26bc8a96d1 (patch) | |
tree | 32c32b4ddbc89e0db3d429589544500411bc8300 /lib | |
parent | 761f40328cdfee6a91c18fdf78e154e36000c251 (diff) | |
parent | b8bd1e5a81080a756913e5804b877aafd770f6e3 (diff) | |
download | nextcloud-server-50101a85a63f29c47abe325aecb3af26bc8a96d1.tar.gz nextcloud-server-50101a85a63f29c47abe325aecb3af26bc8a96d1.zip |
Merge pull request #3982 from owncloud/test_lastinsertid
test lastinsertid
Diffstat (limited to 'lib')
-rw-r--r-- | lib/db.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/db.php b/lib/db.php index e70d66fc2ba..dd48c329490 100644 --- a/lib/db.php +++ b/lib/db.php @@ -344,7 +344,7 @@ class OC_DB { $result = self::executeAudited('SELECT lastval() AS id'); $row = $result->fetchRow(); self::raiseExceptionOnError($row, 'fetching row for insertid failed'); - return $row['id']; + return (int)$row['id']; } else if( $type === 'mssql') { if($table !== null) { $prefix = OC_Config::getValue( "dbtableprefix", "oc_" ); @@ -368,7 +368,7 @@ class OC_DB { $result = self::$connection->lastInsertId($table); } self::raiseExceptionOnError($result, 'insertid failed'); - return $result; + return (int)$result; } /** |