Evenements

SELECT wposts.*,CONVERT(str_to_date(wpostmeta.meta_value,'%d/%m/%Y %H:%i:%s'),date) as mydate FROM wp_posts wposts LEFT JOIN wp_postmeta wpostmeta ON wposts.ID = wpostmeta.post_id WHERE (wposts.post_type = 'journee') AND wposts.post_status = 'publish' AND wpostmeta.meta_key = 'Date de début' AND str_to_date(wpostmeta.meta_value,'%d/%m/%Y') > '2016-09-01' AND wposts.ID NOT IN (SELECT wposts.ID FROM wp_posts wposts LEFT JOIN wp_postmeta wpostmeta ON wposts.ID = wpostmeta.post_id LEFT JOIN wp_term_relationships ON(wposts.ID = wp_term_relationships.object_id) LEFT JOIN wp_term_taxonomy ON(wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id) LEFT JOIN wp_terms ON(wp_terms.term_id = wp_term_taxonomy.term_id) WHERE (wposts.post_type = 'journee') AND wp_terms.name = 'Séminaire' AND wp_term_taxonomy.taxonomy = 'category' AND wpostmeta.meta_key = 'Date de début') order by mydate desc ;
 
Pas de journées plus anciennesPas de journées plus récentes