Query: SELECT hts.home, hgg.ga as a_score, agg.ga as h_score, s.game_date, hts.game_id, ht.short_name as h_short, at.short_name as a_short FROM smf_osm_team_schedule as hts LEFT JOIN smf_osm_team_schedule as ats USING(game_id) LEFT JOIN smf_osm_schedule as s ON(hts.game_id = s.game_id) LEFT JOIN smf_osm_teams as ht ON(hts.team_id = ht.team_id) LEFT JOIN smf_osm_teams as at ON(ats.team_id = at.team_id) LEFT JOIN smf_osm_goalie_games as hgg ON(hts.team_id = hgg.team_id AND hts.game_id = hgg.game_id) LEFT JOIN smf_osm_goalie_games as agg ON(ats.team_id = agg.team_id AND ats.game_id = agg.game_id) WHERE ht.career_id = 1122 AND at.career_id = AND s.entered = 1 ORDER BY s.game_date DESC
Error: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 'AND s.entered = 1 ORDER BY s.game_date DESC' at line 9