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 ') OR metro2 IN () OR metro3 IN ()) AND town = '1' ORDER BY ispublic ASC, price ' at line 1