An Error Was Encountered
Error Number: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'cta' at line 25
( select o.orgID, o.name as orgName, null as eventID, null as name, null as dateBegin, null as dateEnd, o.image as image, vl.videoID, vl.videoLink, vl.itemType, vl.videoSource, vl.dts from video_link vl inner join org o on vl.itemID = o.orgID and vl.itemType = 'org' where o.display != 0 and vl.videoLink != '' ) union ( select e.orgID, e.orgName, e.eventID, e.name, e.dateBegin, e.dateEnd, e.image, vl.videoID, vl.videoLink, vl.itemType, vl.videoSource, vl.dts from video_link vl inner join event e on vl.itemID = e.eventID and vl.itemType = 'event' where e.display != 0 and vl.videoLink != '' and e.dateEnd >= curdate() ) limit 5 offset cta