Elevators

SELECT mod_cms_id , mod_cms_file , mod_cms_create_date FROM mod_cms WHERE mod_cms_modulekey = 'product' AND mod_cms_staus = '1' AND ((mod_cms_start_date='0000-00-00 00:00:00' AND mod_cms_finish_date='0000-00-00 00:00:00') OR (mod_cms_start_date='0000-00-00 00:00:00' AND TO_DAYS(mod_cms_finish_date)>=TO_DAYS(NOW()) ) OR (TO_DAYS(mod_cms_start_date)<=TO_DAYS(NOW()) AND mod_cms_finish_date='0000-00-00 00:00:00' ) OR (TO_DAYS(mod_cms_start_date)<=TO_DAYS(NOW()) AND TO_DAYS(mod_cms_finish_date)>=TO_DAYS(NOW()) )) ORDER BY mod_cms_order DESC