Cannot execute query: SELECT evday, evmonth, evyear, evtitle, evdetail, endday, endmonth, endyear FROM tng_timelineevents WHERE (evyear <= "1840" AND endyear >= "1791") OR (endyear = "" AND (evyear BETWEEN "1791" AND "1840")) ORDER BY evyear, evmonth, evday