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 '-[location=`javas\\\\x63ript:confirm252812529`]//3e3csvg3e%' OR LOWER(descrip' at line 1 SQL query : SELECT COUNT(DISTINCT p.productID) FROM SS_products p where categoryID>1 and enabled=1 and ( LOWER(name) LIKE '%igri3c!27/*!22/*\\\\27/*\\\\22/**/-[location=`javas\\\\x63ript:confirm252812529`]//3e3csvg3e%' /* OR LOWER(product_code ) LIKE '%igri3c!27/*!22/*\\\\27/*\\\\22/**/-[location=`javas\\\\x63ript:confirm252812529`]//3e3csvg3e%' OR LOWER(description) LIKE '%igri3c!27/*!22/*\\\\27/*\\\\22/**/-[location=`javas\\\\x63ript:confirm252812529`]//3e3csvg3e%' OR LOWER(brief_description) LIKE '%igri3c!27/*!22/*\\\\27/*\\\\22/**/-[location=`javas\\\\x63ript:confirm252812529`]//3e3csvg3e%' */)