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 property.stype='rent' AND pro' at line 7SELECT COUNT(*) FROM property INNER JOIN web_users ON web_users.idweb_users=property.idweb_users WHERE web_users.active=1 AND remove=0 AND hide=0 AND verified=1 AND property.waiting_comp_approval='0' AND ( (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 property.stype='rent' AND property.offer_wanted='1'