
Chris
Staff

Sep 22, 2009, 1:49 PM
Post #2 of 2
(1527 views)
Shortcut
|
|
Re: [Dominik] Search Results - Adv Search Result
[In reply to]
|
Can't Post
|
|
Hi Dominik, Unfortunately, this is a little tricky. You'll need to add some code to your search results page. You probably have code like this already at the top of your search results page:
list($listingsRecords, $listingsMetaData) = getRecords(array( 'tableName' => 'listings', )); Replace that with the following:
$where = '1'; if (@$_REQUEST['lfield14_keyword']) { $values = preg_split('|,\s*|', $_REQUEST['lfield14_keyword']); unset($_REQUEST['lfield14_keyword']); $orConditions = array(); foreach ($values as $value) { $orConditions[] = "lfield14 LIKE '%" . mysql_escape($value) . "%'"; } $where = '(' . join(' OR ', $orConditions) . ')'; } list($listingsRecords, $listingsMetaData) = getRecords(array( 'tableName' => 'listings', 'where' => $where, )); Please note that you'll want to try this on a copy of that page so you don't break your live site if anything goes wrong. I hope this helps. Please let me know if you run into any trouble or have any questions. Chris
|