SELECT `id`,`category`,`intro-text`,`pg-rating`,`image`,`url`,`name`,`views`,`public`,`public-date`,`public-update`,`public-user`,`event-start-date`,`event-start-time`,`event-end-date`,`event-end-time`,`event-calendar`,`admin-checked` FROM `#__content_articles` WHERE ( (`public`=1) AND (`parent`=0 OR `parent`!=0) AND (`category`=20 OR ( `id` IN ( SELECT DISTINCT `value-id` FROM `#__content_articles_categories` WHERE `category-id`=20 ) ) ) AND ( ( `event-start-date`>='2021-08-04' OR `event-end-date`>='2021-08-04' OR `event-calendar` LIKE '%"date-start":"2021-08-04"%' ) OR ( `event-end-date`='2021-08-04' OR `event-calendar` LIKE '%"date-end":"2021-08-04"%' OR `event-end-date`='2021-08-05' OR `event-calendar` LIKE '%"date-end":"2021-08-05"%' OR `event-end-date`='2021-08-06' OR `event-calendar` LIKE '%"date-end":"2021-08-06"%' OR `event-end-date`='2021-08-07' OR `event-calendar` LIKE '%"date-end":"2021-08-07"%' OR `event-end-date`='2021-08-08' OR `event-calendar` LIKE '%"date-end":"2021-08-08"%' OR `event-end-date`='2021-08-09' OR `event-calendar` LIKE '%"date-end":"2021-08-09"%' OR `event-end-date`='2021-08-10' OR `event-calendar` LIKE '%"date-end":"2021-08-10"%' ) ) ) AND `event-feed`=1 ORDER BY id DESC LIMIT 12 OFFSET 0

Конкурс