A Database Error Occurred
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 'OFFSET 105' at line 1
SELECT events_groups.id as group_id, events_groups.group_name, events_groups.slug as group_slug, events.*,events.slug as event_slug, venues.*, events.id as id, events.source_id as source_id, events.name as eventname, venues.name as venuename, venues.slug as venue_slug, venues.city as venue_city, m1.pref_value as start_date, m2.pref_value as end_date, CASE WHEN m3.pref_value<>'' then m3.pref_value ELSE m5.pref_value END as short_description, m4.pref_value as ticket_count, CASE WHEN sites_events_map.url<>'' THEN sites_events_map.url ELSE events.url END as url, IFNULL(NULLIF(sites_events_map.sort_order,0), 99999) as sort_order, event_promo_tags.promo_tag FROM events inner join venues on events.venue_id=venues.id left join events_preferences_map m1 on m1.event_id=events.id and pref_type='startDate' left join events_preferences_map m2 on m2.event_id=events.id and m2.pref_type='endDate' left join events_preferences_map m3 on m3.event_id=events.id and m3.pref_type='shortDescription' left join events_preferences_map m4 on m4.event_id=events.id and m4.pref_type='ticket_count' left join events_preferences_map m5 on m5.event_id=events.id and m5.pref_type='description' left join sites_events_map on events.id=sites_events_map.event_id and sites_events_map.site_id=431 left join (select event_id, COALESCE( pref_value ) as promo_tag from events_preferences_map where pref_type='promo_tag' group by event_id) event_promo_tags on event_promo_tags.event_id=events.id left join events_groups on FIND_IN_SET(events.id, events_groups.events_list)>0 left join events_venues_map on events.id=events_venues_map.event_id where IFNULL(sites_events_map.active,events.active)=1 and events.source_id in (3, 4) and cast(m1.pref_value as date) >= CURDATE() and events.eventType in ('Cruise','Discount','General Performer','Prom','Pub Crawl','Weekly Events') and ((venues.country='United States')) order by sort_order, start_date, venues.city, venue_name OFFSET 105