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 ') AND tt_address.addresstype IN (2,3,4,7) AND tt_address.latitude !='' AND tt_ad' at line 5