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 'and g.game_id=cg.game_id' at line 1

Debugging info:

#0  qq(SELECT max(g.date_played) as d from games g,comp_games cg where cg.comp_id= and g.game_id=cg.game_id) called at [/home/rugbylea/rugbyleagueproject/models/functions.php:64]
#1  q(SELECT max(g.date_played) as d from games g,comp_games cg where cg.comp_id= and g.game_id=cg.game_id) called at [/home/rugbylea/rugbyleagueproject/controllers/player_list.php:207]
#2  include(/home/rugbylea/rugbyleagueproject/controllers/player_list.php) called at [/home/rugbylea/rugbyleagueproject/controllers/summary_world_club_challenge.php:30]
#3  include(/home/rugbylea/rugbyleagueproject/controllers/summary_world_club_challenge.php) called at [/home/rugbylea/rugbyleagueproject/controllers/summary.php:42]
#4  include(/home/rugbylea/rugbyleagueproject/controllers/summary.php) called at [/home/rugbylea/rugbyleagueproject/handlers/competitions.php:181]
#5  include(/home/rugbylea/rugbyleagueproject/handlers/competitions.php) called at [/home/rugbylea/rugbyleagueproject/entry.php:199]
#6  require(/home/rugbylea/rugbyleagueproject/entry.php) called at [/home/rugbylea/rugbyleagueproject/public_html/www/competitions:3]