Query:
MYSQL error: Error executing query
1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') OR g.away_id IN ()) group by g.venue_id' at line 1

Debugging info:

#0  qq(SELECT v.*,l.*,count(g.venue_id) as numgames,avg(g.crowd) as 'avg-crowd' from venues v, locations l,games g,comp_games cg where v.location_id=l.location_id and v.venue_id=g.venue_id /*and g.crowd>0*/ and g.game_id=cg.game_id and cg.comp_id IN (1806) AND (g.home_id IN () OR g.away_id IN ()) group by g.venue_id) called at [/home/rugbylea/rugbyleagueproject/models/functions.php:64]
#1  q(SELECT v.*,l.*,count(g.venue_id) as numgames,avg(g.crowd) as 'avg-crowd' from venues v, locations l,games g,comp_games cg where v.location_id=l.location_id and v.venue_id=g.venue_id /*and g.crowd>0*/ and g.game_id=cg.game_id and cg.comp_id IN (1806) AND (g.home_id IN () OR g.away_id IN ()) group by g.venue_id) called at [/home/rugbylea/rugbyleagueproject/models/comp.class.php:242]
#2  comp->venueList() called at [/home/rugbylea/rugbyleagueproject/controllers/venue_list.php:50]
#3  include(/home/rugbylea/rugbyleagueproject/controllers/venue_list.php) called at [/home/rugbylea/rugbyleagueproject/handlers/seasons.php:142]
#4  include(/home/rugbylea/rugbyleagueproject/handlers/seasons.php) called at [/home/rugbylea/rugbyleagueproject/entry.php:199]
#5  require(/home/rugbylea/rugbyleagueproject/entry.php) called at [/home/rugbylea/rugbyleagueproject/public_html/www/seasons:3]