asdsad
This commit is contained in:
@@ -55,9 +55,12 @@ if ($pdo) {
|
|||||||
foreach ($tokens as $tok) {
|
foreach ($tokens as $tok) {
|
||||||
$tok = trim($tok);
|
$tok = trim($tok);
|
||||||
if ($tok === '') continue;
|
if ($tok === '') continue;
|
||||||
$ph = 't' . $i++;
|
$ph1 = 't' . $i . '_title';
|
||||||
$conditions[] = "(ft.title LIKE :$ph OR ft.body LIKE :$ph)";
|
$ph2 = 't' . $i . '_body';
|
||||||
$params[$ph] = '%' . $tok . '%';
|
$i++;
|
||||||
|
$conditions[] = "(ft.title LIKE :$ph1 OR ft.body LIKE :$ph2)";
|
||||||
|
$params[$ph1] = '%' . $tok . '%';
|
||||||
|
$params[$ph2] = '%' . $tok . '%';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$whereSearch = $conditions ? ('AND ' . implode(' AND ', $conditions)) : '';
|
$whereSearch = $conditions ? ('AND ' . implode(' AND ', $conditions)) : '';
|
||||||
|
|||||||
Reference in New Issue
Block a user