getFirmLocations: 1064: 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 firm_locations.active = 1 ORDER BY state,city ASC' at line 1:: SELECT SQL_CACHE firm_id from firm_locations WHERE firm_master_id = AND firm_locations.active = 1 ORDER BY state,city ASC