Fixing error in search library
This commit is contained in:
@@ -233,7 +233,9 @@ function assemble_query ($criteria, $searchfields) {
|
||||
} //foreach $whereCriterias
|
||||
|
||||
$whereClause .= str_repeat(')', $nesting);
|
||||
$whereClause = trim ($whereClause);
|
||||
|
||||
if ($whereClause != '') {
|
||||
$query = sprintf ("SELECT bookmark.title,
|
||||
bookmark.url,
|
||||
bookmark.description,
|
||||
@@ -254,6 +256,10 @@ function assemble_query ($criteria, $searchfields) {
|
||||
$mysql->escape ($username),
|
||||
$whereClause);
|
||||
|
||||
}
|
||||
else {
|
||||
$query = false;
|
||||
}
|
||||
return $query;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user