$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_" );
$result = self::$connection->lastInsertId($table);
}
self::raiseExceptionOnError($result, 'insertid failed');
- return $result;
+ return (int)$result;
}
/**