[SOLVED] Query malfunctions when go from 3 field parameters
Posted: Mon Jun 21, 2004 8:42 am
I am trying to display results drawing from 4 categories that are in my database. Currently I have 3 categories, and the results display correctly:
If I add one more category to the query, however, the results show only the category that I add, which in this case is "6":
Am I limited to the number of "ORs" that I can put into a query? This really has me stumped since it seems so simple.
Code: Select all
$query_rsClothing = "SELECT * FROM Members WHERE cat_id1 = '213 OR 141 OR 183' OR cat_id2 = '213 OR 141 OR 183' OR cat_id3 = '213 OR 141 OR 183' ORDER BY member_name";Code: Select all
$query_rsClothing = "SELECT * FROM Members WHERE cat_id1 = '6 OR 213 OR 141 OR 183' OR cat_id2 = '6 OR 213 OR 141 OR 183' OR cat_id3 = '6 OR 213 OR 141 OR 183' ORDER BY member_name";