1
0
mirror of https://github.com/owncloud/bookmarks.git synced 2025-02-17 14:54:33 +01:00

Fix Problems with mysql

This commit is contained in:
Brice Maron 2013-10-12 19:31:20 +02:00
parent ba5e37d36c
commit 7f7b7d1f30

View File

@ -108,11 +108,14 @@ class OC_Bookmarks_Bookmarks{
$sql .= ' HAVING true ';
}
foreach($filters as $filter) {
$sql .= ' AND lower(`url` || `title` || `description` || `tags` ) LIKE ? ';
if($CONFIG_DBTYPE == 'mysql')
$sql .= ' AND lower( concat(url,title,description,tags )) like ? ';
else
$sql .= ' AND lower(url || title || description || tags ) like ? ';
$params[] = '%' . strtolower($filter) . '%';
}
}
$sql .= " ORDER BY ".$sqlSortColumn." DESC ";
if($limit == -1 || $limit === false) {
$limit = null;