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 property.offer_wanted='1' AND web_users.active=1 AN' at line 6SELECT COUNT(*) FROM property INNER JOIN web_users ON web_users.idweb_users=property.idweb_users WHERE ( (tree_rec_id IN (140,141,142,143)) OR (tree_rec_id='139')) AND property.verified=1 AND property.waiting_comp_approval='0' AND property.country_code='us' AND property.bedrooms IN (,) AND property.offer_wanted='1' AND web_users.active=1 AND remove=0 AND hide=0 AND property.stype='buy'