SELECT,de.title,case when date_format(date_start,'%d %M %Y') = date_format(date_end,'%d %M %Y') then date_format(date_start,'%d %M %Y') else CONCAT(date_format(date_start,'%d %M %Y'),' - ',date_format(date_end,'%d %M %Y')) end event_date,case when is_all_day = 1 then '' else CONCAT(date_format(date_start,'%H:%i'),' - ',date_format(date_end,'%H:%i')) end event_time,case when is_recuring =1 then  CONCAT(' Every ',date_format(date_start,'%W'))  else '' end event_day ,d.address,d.title as dir_name, d.address1,d.address2,de.introtext,d.tid,,d.attributes,is_recuring,is_all_day, as town_id,t.title as town_title,c.title as cat_title, as cat_id,,c.image,d.latlang,de.web
 FROM cl_directory_events AS de
 LEFT JOIN cl_directory AS d on de.did
 LEFT JOIN cl_directory AS t on d.tid
 INNER JOIN cl_categories AS c on de.catid
 WHERE  ('2015-11-25' between date_format(date_start,'%Y-%m-%d') and date_format(date_end,'%Y-%m-%d') ||  de.date_end >='2015-11-25' ) AND de.published =1  AND de.catid = 112
 ORDER BY DATE_FORMAT(date_start, '%Y-%m-%d'), DATE_FORMAT(date_start, '%r')
Map View
There are no results for this search.