region SELECT * FROM `wp_posts` p LEFT JOIN wp_term_relationships tr_cat ON p.ID = tr_cat.object_id LEFT JOIN wp_term_taxonomy tt_cat ON tr_cat.term_taxonomy_id = tt_cat.term_taxonomy_id LEFT JOIN wp_terms t_cat ON tt_cat.term_id = t_cat.term_id LEFT JOIN wp_postmeta pm_deps ON p.ID = pm_deps.post_id WHERE p.post_type = 'annonce' AND p.post_status = 'publish' AND tt_cat.taxonomy = 'categories_annonce' AND = %s AND pm_deps.meta_key = 'departement' AND (1=0 OR pm_deps.meta_value = %s OR pm_deps.meta_value = %s ) GROUP BY p.ID ORDER BY p.post_date DESC