how to join two different fields from same table
table schedule_scores
id
date
time
arena_id
home_team
visiting_team
table arenas
id
arena_name
table teams
id
name
trying to get teams.name to go into both schedule_scores.home_team and schedule_scores.visiting_team. I can get it to work with one, but not both. any ideas? Thanks!
SELECT
schedule_scores.date,
schedule_scores.time,
arenas.arena_name,
teams.name
FROM
schedule_scores
INNER JOIN arenas ON (schedule_scores.arena_id = arenas.id)
INNER JOIN teams ON (schedule_scores.home_team = teams.id)