diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2012-07-30 22:42:43 +0200 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2012-08-01 14:59:08 +0200 |
commit | e13f381189788c74fe08a3f3336d961977ff9dc4 (patch) | |
tree | 19b81673f6804e718534e4c6a286c94e0a2743b8 /apps/bookmarks | |
parent | 795e78809f55be762fb07d9a179bbdffa7aefbd9 (diff) | |
download | nextcloud-server-e13f381189788c74fe08a3f3336d961977ff9dc4.tar.gz nextcloud-server-e13f381189788c74fe08a3f3336d961977ff9dc4.zip |
add limit support to OC_DB & OCP/DB
Diffstat (limited to 'apps/bookmarks')
-rw-r--r-- | apps/bookmarks/lib/bookmarks.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/bookmarks/lib/bookmarks.php b/apps/bookmarks/lib/bookmarks.php index 4b9e3d6438a..d569bf528a1 100644 --- a/apps/bookmarks/lib/bookmarks.php +++ b/apps/bookmarks/lib/bookmarks.php @@ -78,9 +78,8 @@ class OC_Bookmarks_Bookmarks{ `*PREFIX*bookmarks`.`user_id` = ? GROUP BY `id`, `url`, `title` '.$sqlFilterTag.' - ORDER BY `*PREFIX*bookmarks`.`'.$sqlSortColumn.'` DESC - LIMIT 10 - OFFSET '. $offset); + ORDER BY `*PREFIX*bookmarks`.`'.$sqlSortColumn.'` DESC', + 10,$offset); } else { if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ) $concatFunction = '(url || title || '; @@ -106,8 +105,8 @@ class OC_Bookmarks_Bookmarks{ AND `*PREFIX*bookmarks`.`user_id` = ? GROUP BY `url` '.$sqlFilterTag.' - ORDER BY `*PREFIX*bookmarks`.`'.$sqlSortColumn.'` DESC - LIMIT '.$offset.', 10'); + ORDER BY `*PREFIX*bookmarks`.`'.$sqlSortColumn.'` DESC', + 10, $offset); } $bookmarks = $query->execute($params)->fetchAll(); |