WordPress database error: [Incorrect DATETIME value: '']SELECT SQL_CALC_FOUND_ROWS wp_posts.*, CAST( orderby_event_date_utc_meta.meta_value AS DATETIME ) AS event_date_utc
FROM wp_posts LEFT JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) LEFT JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id AND mt1.meta_key = '_EventHideFromUpcoming' )
LEFT JOIN wp_postmeta AS orderby_event_date_utc_meta
ON (
orderby_event_date_utc_meta.post_id = wp_posts.ID
AND orderby_event_date_utc_meta.meta_key = '_EventStartDateUTC'
)
WHERE 1=1 AND wp_posts.ID NOT IN (4704) AND (
(
( wp_postmeta.meta_key = '_EventStartDate' AND CAST(wp_postmeta.meta_value AS DATETIME) < '' )
OR (
( wp_postmeta.meta_key = '_EventStartDate' AND CAST(wp_postmeta.meta_value AS DATETIME) = '' )
AND wp_postmeta.post_id < 4704
)
)
AND
mt1.post_id IS NULL
) AND wp_posts.post_type = 'tribe_events' AND ((wp_posts.post_status = 'publish'))
GROUP BY wp_posts.ID
ORDER BY event_date_utc DESC, wp_posts.post_date DESC
LIMIT 0, 1
WordPress database error: [Incorrect DATETIME value: '']SELECT SQL_CALC_FOUND_ROWS wp_posts.*, CAST( orderby_event_date_utc_meta.meta_value AS DATETIME ) AS event_date_utc
FROM wp_posts LEFT JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) LEFT JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id AND mt1.meta_key = '_EventHideFromUpcoming' )
LEFT JOIN wp_postmeta AS orderby_event_date_utc_meta
ON (
orderby_event_date_utc_meta.post_id = wp_posts.ID
AND orderby_event_date_utc_meta.meta_key = '_EventStartDateUTC'
)
WHERE 1=1 AND wp_posts.ID NOT IN (4704) AND (
(
( wp_postmeta.meta_key = '_EventStartDate' AND CAST(wp_postmeta.meta_value AS DATETIME) > '' )
OR (
( wp_postmeta.meta_key = '_EventStartDate' AND CAST(wp_postmeta.meta_value AS DATETIME) = '' )
AND wp_postmeta.post_id > 4704
)
)
AND
mt1.post_id IS NULL
) AND wp_posts.post_type = 'tribe_events' AND ((wp_posts.post_status = 'publish'))
GROUP BY wp_posts.ID
ORDER BY event_date_utc ASC, wp_posts.post_date ASC
LIMIT 0, 1