This commit is contained in:
2025-12-31 01:45:35 +01:00
parent 5ccf8a748a
commit 4bddcbee73

View File

@@ -27,16 +27,16 @@ final class Search
$tok = trim($tok); $tok = trim($tok);
if ($tok === '') continue; if ($tok === '') continue;
$ph = [ $ph = [
':t' . $i . 'a', 't' . $i . 'a',
':t' . $i . 'b', 't' . $i . 'b',
':t' . $i . 'c', 't' . $i . 'c',
':t' . $i . 'd', 't' . $i . 'd',
':t' . $i . 'e', 't' . $i . 'e',
':t' . $i . 'f', 't' . $i . 'f',
]; ];
$conditions[] = "(title LIKE {$ph[0]} OR teaser_public LIKE {$ph[1]} OR description LIKE {$ph[2]} OR city LIKE {$ph[3]} OR region LIKE {$ph[4]} OR zip LIKE {$ph[5]})"; $conditions[] = "(title LIKE :{$ph[0]} OR teaser_public LIKE :{$ph[1]} OR description LIKE :{$ph[2]} OR city LIKE :{$ph[3]} OR region LIKE :{$ph[4]} OR zip LIKE :{$ph[5]})";
foreach ($ph as $p) { foreach ($ph as $p) {
$params[ltrim($p, ':')] = '%' . $tok . '%'; $params[$p] = '%' . $tok . '%';
} }
$i++; $i++;
} }