[FX.php List] Query question

Bob Patin bob at patin.com
Thu Jan 25 16:00:12 MST 2007


I can't believe I've not had to do this type of search before:

I need to search 5 or more fields; in one of the fields, I need to  
search for 1 or more different catalog numbers. So a search would be  
like this:

CITY -- 1 value here
STATE - 1 value here
ZIP - 1 value here
CATALOG NUMBER - could be a bunch of different cat. numbers

I'd thought that I could just concatenate the catalog numbers like this:

$cat_num=AB001 AB002 AB003 ... and so on

and then search the catalog_number field using a single line  
AddDBParam('cat_num',$cact_num);

But this doesn't work right. if I add an OR conditional, doesn't it  
apply to the whole query?

How do I search for this:

(these first 3 must match)
Nashville
TN
37211

plus, it must contain 1 of these catalog numbers:
AB001 or AB002	

I know this is simple, but I can't remember how this is done...

Thanks,

Bob Patin
bob at patin.com



More information about the FX.php_List mailing list