/home/templeis/public_html/images/header_image/1452717115header_imagetemple_listings.jpg.

SELECT * FROM ( SELECT `shows`.`show_id`, `shows`.`event_mc_id`, `shows`.`title_mc`, `shows`.`title`, `shows`.`description`, `shows`.`short_description`, `shows`.`long_description`, `shows`.`status`, `shows`.`show_mc_type_name`, `shows`.`more_info_button`, `shows_mc_date`.`sd_shows_start_date`, `shows_mc_date`.`sd_shows_end_date`, `shows`.`short_statement`, `events`.`event_date`, `events`.`event_id`, `events`.`title` as `event_title`, `events`.`contact_name`, `events`.`contact_email`, `events`.`contact_phone`, `events`.`hide_contact_name`, `events`.`hide_contact_email`, `events`.`hide_contact_phone`, DATE_FORMAT(`events`.`start_date`, '%h:%i %p') AS e_start_time, DATE_FORMAT(`events`.`end_date`, '%h:%i %p') AS e_end_time FROM `shows` INNER JOIN `events` ON (`events`.`event_id`=`shows`.`event_mc_id` AND DATE_FORMAT(`events`.`end_date`,'%Y-%m-%d') >= CURDATE()) LEFT JOIN `shows_mc_date` ON `shows_mc_date`.`sd_shows_mc_id`=`shows`.`event_mc_id` INNER JOIN `show_types` ON `show_types`.`show_type_id`=`shows`.`show_type` WHERE `shows`.`status`='1' AND (`shows_mc_date`.`sd_shows_end_date` - INTERVAL 180 DAY) <= curdate() -- AND `shows_mc_date`.`sd_shows_end_date` >= curdate() AND `show_types`.`status`='1' ORDER BY `events`.`event_date` ASC, `events`.`start_date` ASC ) x GROUP BY `event_id` ORDER BY `event_date` ASC LIMIT 0, 10