SELECT * FROM JT_City WHERE (REPLACE(sCityName,'/ ','')='Bodufungadu Island' AND iProvinceID =Huvadhu Atoll ) OR (REPLACE(sCityName,'/',' ')='Bodufungadu Island' AND iProvinceID =Huvadhu 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 'Atoll ) OR (REPLACE(sCityName,'/',' ')='Bodufungadu Island' AND iProvinceID =Hu' at line 1