SELECT SQL_CALC_FOUND_ROWS DISTINCT fpirb_posts.*, IF (fpirb_posts.post_type = 'tribe_events', fpirb_postmeta.meta_value, fpirb_posts.post_date) AS post_date FROM fpirb_posts LEFT JOIN fpirb_term_relationships ON (fpirb_posts.ID = fpirb_term_relationships.object_id) LEFT JOIN fpirb_postmeta as fpirb_postmeta on fpirb_posts.ID = fpirb_postmeta.post_id AND fpirb_postmeta.meta_key = '_EventStartDateUTC' WHERE 1=1 AND ( 0 = 1 AND fpirb_term_relationships.term_taxonomy_id IN (578) ) AND ((fpirb_posts.post_type = 'post' AND (fpirb_posts.post_status = 'publish' OR fpirb_posts.post_status = 'acf-disabled' OR fpirb_posts.post_status = 'tribe-ea-success' OR fpirb_posts.post_status = 'tribe-ea-failed' OR fpirb_posts.post_status = 'tribe-ea-schedule' OR fpirb_posts.post_status = 'tribe-ea-pending' OR fpirb_posts.post_status = 'tribe-ea-draft')) OR (fpirb_posts.post_type = 'tribe_events' AND (fpirb_posts.post_status = 'publish' OR fpirb_posts.post_status = 'acf-disabled' OR fpirb_posts.post_status = 'tribe-ea-success' OR fpirb_posts.post_status = 'tribe-ea-failed' OR fpirb_posts.post_status = 'tribe-ea-schedule' OR fpirb_posts.post_status = 'tribe-ea-pending' OR fpirb_posts.post_status = 'tribe-ea-draft'))) GROUP BY fpirb_posts.ID ORDER BY post_date DESC LIMIT 0, 6

Copyright 2022 - JUULS. All Rights Reserved | Ontwikkeld door LienOnline