SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) INNER JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id AND mt1.meta_key = "ev-time" ) INNER JOIN wp_postmeta AS mt2 ON ( wp_posts.ID = mt2.post_id AND mt2.meta_key = "ev-day" )
WHERE 1=1 AND (
( wp_postmeta.meta_key = 'ev-day' AND CAST(wp_postmeta.meta_value AS DATE) > '2024-10-11' )
OR
(
( mt1.meta_key = 'ev-time' AND CAST(mt1.meta_value AS TIME) >= '01' )
AND
( mt2.meta_key = 'ev-day' AND CAST(mt2.meta_value AS DATE) = '2024-10-11' )
)
) AND ((wp_posts.post_type = 'events' AND (wp_posts.post_status = 'publish')))
GROUP BY wp_posts.ID
ORDER BY CAST(wp_postmeta.meta_value AS DATE) ASC, CAST(mt1.meta_value AS TIME) ASC
LIMIT 0, 9
Московская область,Одинцовский р-н,Рублёво-Успенское ш.,дер. Жуковка, д. 207 | info@jcczhukovka.comВсе материалы для сайта доступны по лицензии:Creative Commons Attribution 4.0 International