SELECT event_title, event_time, event_id, categories_langs.category_name AS category_name, category_image, event_time_end
FROM (categories RIGHT JOIN events ON
events.category_id = categories.category_id) LEFT JOIN categories_langs ON
categories.category_id = categories_langs.category_id WHERE events.event_date = '2018-04-20 00:00:00' AND (categories_langs.language_id = 'en' OR events.category_id IS NULL) AND (events.event_is_public = 1 OR (events.event_is_public=0 AND events.user_id=0)) ORDER BY events.event_time, event_date LIMIT 0,100
|
|