[PHP] Re: If MySQL column/field values are in an PHP array

2007-07-19 Thread kvigor
OK, $cen_fields is an array of a store's Name, City, and State concatenated. $cen_fields[0] echo'd looks like this: CHIEFS SUPERMARKET ST. MARYS OH $cen_fields[1] echo'd looks like this: CHIEFS SUPERMARKET CELINA OH $in_list is the concatenated store's Name, City, and State but formatted w/ co

[PHP] Re: If MySQL column/field values are in an PHP array

2007-07-19 Thread M. Sokolewicz
kvigor wrote: I created an array using the following: $in_list = "'".join("','",$cen_chiefs)."'"; //$cen_chiefs is an array $query_cen_chiefs = "SELECT * FROM central WHERE CONCAT(strName,' ',strCity,' ',strState) IN({$in_list})"; How would I go about adding an AND clause to the above query