Please help.
I have two tables,
tbl_teams(
teamid,
team_name,
...
)
and
tbl_fixtures(
fixid,
fix_hometeam,
fix_awayteam,
fix_date
)
fix_hometeam & fix_awayteam correspond to tbl_teams.teamid
What i'm trying to do is run a query that returns the name of the home team, the name of the away team, and the date.
But am failing miserably.
SELECT tbl_teams.team_name, tbl_fixtures.fix_date FROM tbl_fixtures LEFT JOIN tbl_teams ON tbl_fixtures.fix_hometeam=tbl_teams.teamid
Obviously, this only reports the name of the home team & the date. Ive tried putting an extra join in on tbl_fixtures.fix_awayteam=tbl_teams.teamid, but to no avail.
Can anybody help me with this query with the tables as they are, or do i need to re-think my schema?
TIA
I have two tables,
tbl_teams(
teamid,
team_name,
...
)
and
tbl_fixtures(
fixid,
fix_hometeam,
fix_awayteam,
fix_date
)
fix_hometeam & fix_awayteam correspond to tbl_teams.teamid
What i'm trying to do is run a query that returns the name of the home team, the name of the away team, and the date.
But am failing miserably.
SELECT tbl_teams.team_name, tbl_fixtures.fix_date FROM tbl_fixtures LEFT JOIN tbl_teams ON tbl_fixtures.fix_hometeam=tbl_teams.teamid
Obviously, this only reports the name of the home team & the date. Ive tried putting an extra join in on tbl_fixtures.fix_awayteam=tbl_teams.teamid, but to no avail.
Can anybody help me with this query with the tables as they are, or do i need to re-think my schema?
TIA