You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'extractvalue(1,concat(char(126),md5(1624770919)))and&amp' at line 1 SQL query : SELECT COUNT(DISTINCT p.productID) FROM SS_products p where categoryID>1 and enabled=1 and ( LOWER(name) LIKE '%asus+tf103cg+k0185e0f0e5ff+bl+3506"and/**/extractvalue(1,concat(char(126),md5(1624770919)))and"%' /* OR LOWER(product_code ) LIKE '%asus+tf103cg+k0185e0f0e5ff+bl+3506"and/**/extractvalue(1,concat(char(126),md5(1624770919)))and"%' OR LOWER(description) LIKE '%asus+tf103cg+k0185e0f0e5ff+bl+3506"and/**/extractvalue(1,concat(char(126),md5(1624770919)))and"%' OR LOWER(brief_description) LIKE '%asus+tf103cg+k0185e0f0e5ff+bl+3506"and/**/extractvalue(1,concat(char(126),md5(1624770919)))and"%' */)