[FX.php List] AddDBParam using or for search

Greg Lane glane at moyergroup.com
Tue Feb 8 00:50:10 MST 2005


Hello Lynn,

FMSA7 doesn't allow "or" searches for multiple criteria in the same  
field. For your example, you can work around this by creating a one  
line FileMaker script with an Extend Found Set script step that  
includes the Corporate_Home_Both = "Both" criteria. Then your PHP would  
look something like:

	$query->AddDBParam('Corporate_Home_Both',$_GET['cat']);	$query- 
 >AddDBParam('-script.presort', 'ExtendFindBoth');
	$result = $query->FMFind();

This will run the ExtendFindBoth script after the Find but before the  
results are sorted or returned to FX.php.

Greg


On Feb 4, 2005, at 5:53 PM, L.M.Loeffel wrote:

> Can anyone tell me what I might be doing wrong on this?
>
> I am trying to show results using a "or" not an "and"
>
> I want to write this (I think)
>
>  $query->AddDBParam("-lop", "or");
>  $query->AddDBParam('Corporate_Home_Both',$_GET['cat']);
>  $query->AddDBParam('Corporate_Home_Both','Both');
>  $result = $query->FMFind();
>
> However, it tells me "no records found"
>
> The following single search works fine .....
>
>  $query->AddDBParam('Corporate_Home_Both','Both');
>  $result = $query->FMFind();
>
> Do I have something wrong? If so, what  might it be?



More information about the FX.php_List mailing list