1 |
SELECT
`p`.*,
`e`.`post_id`,
`i`.`id` AS `instance_id`,
`i`.`start` AS `start`,
`i`.`end` AS `end`,
`e`.`timezone_name` AS `timezone_name`,
`e`.`allday` AS `event_allday`,
`e`.`recurrence_rules`,
`e`.`exception_rules`,
`e`.`recurrence_dates`,
`e`.`exception_dates`,
`e`.`venue`,
`e`.`country`,
`e`.`address`,
`e`.`city`,
`e`.`province`,
`e`.`postal_code`,
`e`.`instant_event`,
`e`.`show_map`,
`e`.`contact_name`,
`e`.`contact_phone`,
`e`.`contact_email`,
`e`.`contact_url`,
`e`.`cost`,
`e`.`ticket_url`,
`e`.`ical_feed_url`,
`e`.`ical_source_url`,
`e`.`ical_organizer`,
`e`.`ical_contact`,
`e`.`ical_uid`,
`e`.`longitude`,
`e`.`latitude`
FROM
wp_ai1ec_events e
INNER JOIN
wp_posts p
ON ( `p`.`ID` = `e`.`post_id` )
INNER JOIN
wp_ai1ec_event_instances i
ON ( `e`.`post_id` = `i`.`post_id` )
LEFT JOIN `wp_term_relationships` AS `term_relationships_events_categories` ON ( `e` . `post_id` = `term_relationships_events_categories` . `object_id` ) LEFT JOIN `wp_term_taxonomy` AS `term_taxonomy_events_categories` ON (`term_relationships_events_categories` . `term_taxonomy_id` = `term_taxonomy_events_categories` . `term_taxonomy_id` AND `term_taxonomy_events_categories` . taxonomy = 'events_categories' )
WHERE
post_type = 'ai1ec_event'
AND
i.end > 1740805200 AND i.start < 1743480000
AND( term_taxonomy_events_categories.term_id IN ( 47 ) )
AND post_status = 'publish'
GROUP BY
`i`.`id`
ORDER BY
`e` . `allday` DESC,
`i` . `start` ASC,
`p` . `post_title` ASC |
0.88 |
0 |