Multiple joins for 3 tables
Posted: Fri Sep 04, 2009 9:48 am
Hi
i'm trying to get this query to work but i can't see how
it has three tables, fixtures, alleys and teams
and i want to get the names to replace the id numbers referenced in the fixtures table
Can anyone help me
Cheers
Kevin
i'm trying to get this query to work but i can't see how
Code: Select all
SELECT alleys.alley_id, alleys.alley_name, fixtures.alley_id, fixtures.fixture_id, fixtures.division_num, fixtures.fixture_home_team_id, fixtures.fixture_away_team_id, fixtures.fixture_date, fixtures.fixture_time, teams.team_id, teams.team_name
FROM fixtures LEFT JOIN alleys ON alleys.alley_id = fixtures.alley_id AND teams ON teams.team_id = fixtures.fixture_home_team_id AND teams ON teams.team_id = fixtures.fixture_away_team_idand i want to get the names to replace the id numbers referenced in the fixtures table
Can anyone help me
Cheers
Kevin