problem with multisearch

12 posts by 4 authors in: Forums > CMS Builder
Last Post: February 23, 2011   (RSS)

Re: [hordak] problem with multisearch

By Jason - February 23, 2011

Hi,

You're not going to be able to combine the code from these two types of search very well since they work completely differently. The error is coming from the fact that in your code, you're never defining a variable called $searchDetails, but you are trying to use it to output information.

Here are some things to help. First, remove any code that comes from the MultiSearch. For example:

$searchOptions = array();
$searchOptions['keywords'] = @$FORM['q'];
$searchOptions['perPage'] = "10";
$searchOptions['debugSql'] = "1";


Next, you'll need to rename your form field to match the names of the section fields you want to search on. For example, if you wanted to search against fields called title and content, you would name your field like this:

<input type="text" name="title,content_keywords" value="<?php echo htmlspecialchars(@$_REQUEST['title,content_keywords']); ?>">

Finally, when outputting you're records, use $sv_campus_direcotryRecords for your foreach loop. This is the variable that will hold all of your results.

Hope this helps get you started.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/