forked from leftypol/leftypol
SQL error when search is by filter only (no query for post body)
This commit is contained in:
parent
10d6884ab3
commit
0c93747464
1 changed files with 3 additions and 1 deletions
4
mod.php
4
mod.php
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue