SELECT * FROM JT_City WHERE (REPLACE(sCityName,'/ ','')='Halaveli Island' AND iProvinceID =North Ari Atoll ) OR (REPLACE(sCityName,'/',' ')='Halaveli Island' AND iProvinceID =North Ari Atoll);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 'Ari Atoll ) OR (REPLACE(sCityName,'/',' ')='Halaveli Island' AND iProvinceID =N' at line 1