mysql query AND OR

admin

Administrator
Staff member
What is wrong with this query?

It returns the correct results, but it does not take in account the prod_web='ja' it returns everything.

mysql_query("SELECT * FROM products WHERE prod_web='ja' AND prod_naam LIKE '%$searchstring%' OR prod_k_omschr LIKE '%$searchstring%' OR prod_l_omschr LIKE '%$searchstring%'") or die (mysql_error());

Kind regards,
Gerry.
 
Back
Top