I have a query that needs to check if a column has one of three values, also the query includes other stuff:
category LIKE '%$category%' AND Sub_Category LIKE '%$subcategory%' OR Sub_Category LIKE '%$subcategory1%' OR Sub_Category LIKE '%$subcategory2%'
AND Category_Split LIKE '$shapes%' AND manufacturer LIKE'$towelmanu' AND
length1 LIKE '$minwidth' AND doortype LIKE '$doortype'
This does not work, it pulls all the info ignoring the other requirements, using only the OR's, really stuck on how to format this, I guess it's done using a subquery but cannot seem to crack the format.