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_dep ON p.ID = pm_dep.post_id WHERE p.post_type = 'annonce' AND p.post_status = 'publish' AND tt_cat.taxonomy = 'categories_annonce' AND t_cat.name = %s AND pm_dep.meta_key = 'departement' AND pm_dep.meta_value = %s GROUP BY p.ID ORDER BY p.post_date DESC
  • Cours Certifié de Design en Permaculture - octobre 2016 à La Réunion