23 Feb
(SELECT ID, post_date, post_title, 1 as `blog_id`,cisl_postmeta.meta_value as data_inizio,cisl_postmeta.meta_key FROM cisl_posts , cisl_postmeta
WHERE cisl_posts.ID = cisl_postmeta.post_id
AND cisl_postmeta.meta_key = 'data'
AND cisl_posts.post_status = 'publish' AND MONTH(cisl_postmeta.meta_value ) = MONTH('2021-02-01')
AND YEAR(cisl_postmeta.meta_value ) = YEAR('2021-02-01')
AND cisl_posts.post_type = 'eventi') UNION (SELECT ID, post_date, post_title, 2 as `blog_id`,cisl_2_postmeta.meta_value as data_inizio,cisl_2_postmeta.meta_key FROM cisl_2_posts , cisl_2_postmeta
WHERE cisl_2_posts.ID = cisl_2_postmeta.post_id
AND cisl_2_postmeta.meta_key = 'data'
AND cisl_2_posts.post_status = 'publish' AND MONTH(cisl_2_postmeta.meta_value ) = MONTH('2021-02-01')
AND YEAR(cisl_2_postmeta.meta_value ) = YEAR('2021-02-01')
AND cisl_2_posts.post_type = 'eventi') UNION (SELECT ID, post_date, post_title, 3 as `blog_id`,cisl_3_postmeta.meta_value as data_inizio,cisl_3_postmeta.meta_key FROM cisl_3_posts , cisl_3_postmeta
WHERE cisl_3_posts.ID = cisl_3_postmeta.post_id
AND cisl_3_postmeta.meta_key = 'data'
AND cisl_3_posts.post_status = 'publish' AND MONTH(cisl_3_postmeta.meta_value ) = MONTH('2021-02-01')
AND YEAR(cisl_3_postmeta.meta_value ) = YEAR('2021-02-01')
AND cisl_3_posts.post_type = 'eventi') UNION (SELECT ID, post_date, post_title, 4 as `blog_id`,cisl_4_postmeta.meta_value as data_inizio,cisl_4_postmeta.meta_key FROM cisl_4_posts , cisl_4_postmeta
WHERE cisl_4_posts.ID = cisl_4_postmeta.post_id
AND cisl_4_postmeta.meta_key = 'data'
AND cisl_4_posts.post_status = 'publish' AND MONTH(cisl_4_postmeta.meta_value ) = MONTH('2021-02-01')
AND YEAR(cisl_4_postmeta.meta_value ) = YEAR('2021-02-01')
AND cisl_4_posts.post_type = 'eventi') UNION (SELECT ID, post_date, post_title, 5 as `blog_id`,cisl_5_postmeta.meta_value as data_inizio,cisl_5_postmeta.meta_key FROM cisl_5_posts , cisl_5_postmeta
WHERE cisl_5_posts.ID = cisl_5_postmeta.post_id
AND cisl_5_postmeta.meta_key = 'data'
AND cisl_5_posts.post_status = 'publish' AND MONTH(cisl_5_postmeta.meta_value ) = MONTH('2021-02-01')
AND YEAR(cisl_5_postmeta.meta_value ) = YEAR('2021-02-01')
AND cisl_5_posts.post_type = 'eventi') UNION (SELECT ID, post_date, post_title, 6 as `blog_id`,cisl_6_postmeta.meta_value as data_inizio,cisl_6_postmeta.meta_key FROM cisl_6_posts , cisl_6_postmeta
WHERE cisl_6_posts.ID = cisl_6_postmeta.post_id
AND cisl_6_postmeta.meta_key = 'data'
AND cisl_6_posts.post_status = 'publish' AND MONTH(cisl_6_postmeta.meta_value ) = MONTH('2021-02-01')
AND YEAR(cisl_6_postmeta.meta_value ) = YEAR('2021-02-01')
AND cisl_6_posts.post_type = 'eventi') ORDER BY data_inizio DESC LIMIT 0,40;