SQL error when search is by filter only (no query for post body)

This commit is contained in:
Michael Save 2012-02-12 22:48:03 +11:00
parent 10d6884ab3
commit 0c93747464

View File

@ -1056,7 +1056,9 @@
}
foreach($filters as $name => $value) {
$like .= ' AND `' . $name . '` = '. $pdo->quote($value);
if(!empty($like))
$like .= ' AND ';
$like .= '`' . $name . '` = '. $pdo->quote($value);
}
$like = str_replace('%', '%%', $like);