SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id) INNER JOIN wp_postmeta AS mt1 ON (wp_posts.ID = mt1.post_id) INNER JOIN wp_postmeta AS mt2 ON (wp_posts.ID = mt2.post_id) INNER JOIN wp_postmeta AS mt3 ON (wp_posts.ID = mt3.post_id) INNER JOIN wp_postmeta AS mt4 ON (wp_posts.ID = mt4.post_id) INNER JOIN wp_postmeta AS mt5 ON (wp_posts.ID = mt5.post_id) INNER JOIN wp_postmeta AS mt6 ON (wp_posts.ID = mt6.post_id) INNER JOIN wp_postmeta AS mt7 ON (wp_posts.ID = mt7.post_id) INNER JOIN wp_postmeta AS mt8 ON (wp_posts.ID = mt8.post_id) WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36) ) AND wp_posts.post_type = 'ad_listing' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'tr_pending' OR wp_posts.post_status = 'tr_failed' OR wp_posts.post_status = 'tr_completed' OR wp_posts.post_status = 'tr_activated' OR wp_posts.post_status = 'private') AND ( (wp_postmeta.meta_key = 'cp_price' AND CAST(wp_postmeta.meta_value AS SIGNED) BETWEEN '0' AND '800') AND (mt1.meta_key = 'cp_bezirk' AND CAST(mt1.meta_value AS CHAR) IN ('02. Bezirk','04. Bezirk','05. Bezirk','07.Bezirk','11. Bezirk','13. Bezirk','14. Bezirk','15. Bezirk','17. Bezirk','18. Bezirk','20. Bezirk','21. Bezirk','23. Bezirk')) AND (mt2.meta_key = 'cp_objekttyp' AND CAST(mt2.meta_value AS CHAR) IN ('Wohnung','DG Wohnung','Garconniere','Genossenschaftswohnung','Maisonette')) AND (mt3.meta_key = 'cp_bau' AND CAST(mt3.meta_value AS CHAR) IN ('Altbau','Neubau')) AND (mt4.meta_key = 'cp_size' AND CAST(mt4.meta_value AS CHAR) IN ('40 m² oder weniger','41 - 50 m²','51 - 60 m²','61 - 70 m²','71 - 80 m²','91 - 100 m²')) AND (mt5.meta_key = 'cp_zimmer' AND CAST(mt5.meta_value AS CHAR) IN ('1','2','3','5','6 oder mehr')) AND (mt6.meta_key = 'cp_heizungsart' AND CAST(mt6.meta_value AS CHAR) IN ('Etagenheizung','Zentralheizung','Fernwärme','Fußbodenheizung','Ofen','Keine')) AND (mt7.meta_key = 'cp_sofort_beziehbar' AND CAST(mt7.meta_value AS CHAR) IN ('Ja')) AND (mt8.meta_key = 'cp_balkonloggia' AND CAST(mt8.meta_value AS CHAR) IN ('Ja')) ) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 10
There are currently 1 users browsing this thread. (0 members and 1 guests)