SQL error when search is by filter only (no query for post body)
This commit is contained in:
parent
10d6884ab3
commit
0c93747464
4
mod.php
4
mod.php
@ -1056,7 +1056,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach($filters as $name => $value) {
|
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);
|
$like = str_replace('%', '%%', $like);
|
||||||
|
Loading…
Reference in New Issue
Block a user