Got a slight problem with a left join in mySQL, The codes below.
This works perfectly in mySQL 3.whatever or 4.whatever but on my localhost u've just put mySQL version 5 and its not liking the LEFT join park of the code any ideas why??
Heres the error: #1054 - Unknown column 'fixtures.away_team_id' in 'on clause'
This works perfectly in mySQL 3.whatever or 4.whatever but on my localhost u've just put mySQL version 5 and its not liking the LEFT join park of the code any ideas why??
Heres the error: #1054 - Unknown column 'fixtures.away_team_id' in 'on clause'
Code:
"SELECT fixtures.fixture_id,
fixtures.fixture_date,
fixtures.home_team_id,
teams.team_name AS home_team,
fixtures.away_team_id,
awayTeam.team_name AS away_team,
fixtures.fixture_status
FROM fixtures, teams
LEFT JOIN teams AS awayTeam ON fixtures.away_team_id = awayTeam.team_id
WHERE fixtures.home_team_id = teams.team_id
AND fixtures.fixture_id = $id"