[FX.php List] Google-Like search?

Ernest Cunningham ernest.cunningham at gmail.com
Sun Nov 30 16:42:30 MST 2008


You just need to use the logical operator or in your search. Like this:

//
// Set up variables.
$search = '' ;
$count = '25';

//
// Set variables now if passed.
foreach($_REQUEST as $key=>$value){
  $$key = $value;
}

//
// Setup search query.
$myQuery = new FX($serverIP, $webCompanionPort, $dataSourceType);
$myQuery->SetDBData($database, $layout, $count);
$myQuery->SetDBUserPass ($webUN, $webPW);
$myQuery->FMSkipRecords($skipCount);
$myQuery->AddDBParam('-lop', 'or');
$myQuery->AddDBParam('Account Manager', $search);
$myQuery->AddDBParam('Quote Number', $search);
$myQuery->AddDBParam('Job No', $search);
$myQuery->AddDBParam('Job Name', $search);
$myQuery->AddDBParam('Customer ID c', $search);
$myQuery->AddDBParam('Client Name with Status c', $search);
$myQuery->AddDBParam('Name First|Sirname', $search);
$myQuery->AddDBParam('Name Email', $search);
$myQuery->AddDBParam('Order Number', $search);
$myQuery->AddSortParam('Client Name', 'ascend', 1);
$searchResults = $myQuery->FMFind();							// Performs the find based  
on the specified parameters.


Simple answer.

Kind regards,

Ernest Cunningham

__________________________________________________________

   FileMaker Database Developer
   Nelson,  New Zealand

   Ernest Cunningham
   Mobile: +64-21-40 66 75
   Web Site: www.ging.co.nz
__________________________________________________________

On 1/12/2008, at 9:49 AM, Jonathan Schwartz wrote:

> Hi Folks,
>
> Have been running into web users who don't quite understand the the  
> "one-search-field-per-data-column" approach that I often implement.  
> They seem to be wanting for a single filed search, ala Google.
>
> I can think of two approaches:
> 	1) Combining fields in FMP and searching this new mega-field. Could  
> get ugly.
> 	2) Issuing multiple fx.php searched and combining.  This doesn't  
> smell right, though.
>
> Anyone else approached this challenge?
>
> Thanks
>
> Jonathan
> -- 
> Jonathan Schwartz
> Exit 445 Group
> jonathan at exit445.com
> http://www.exit445.com
> 415-370-5011
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20081201/080c2f51/attachment.html


More information about the FX.php_List mailing list