1
0
mirror of https://github.com/owncloud/bookmarks.git synced 2025-02-18 15:54:28 +01:00

Add sequence name in insertid to be more portable

This commit is contained in:
Brice Maron 2011-10-29 11:40:48 +02:00
parent 31f69bc00e
commit cec6a0bf0a

View File

@ -54,13 +54,7 @@ $params=array(
);
$query->execute($params);
if($CONFIG_DBTYPE == 'pgsql')
{
$query = OC_DB::prepare("SELECT currval('*PREFIX*bookmarks_id_seq')");
$b_id = $query->execute()->fetchOne();
} else {
$b_id = OC_DB::insertid();
}
$b_id = OC_DB::insertid('*PREFIX*bookmarks');
if($b_id !== false) {