Q:

Duplicate names showing when joining tables from database

I have two tables in my database. One is a schedules table and the other is a league teams table. The schedules table does not have the names of the teams, it just has their ID, but the teams table does. 
My tables
I used this code to JOIN the tables 
SELECT statsSchedules.*
     , leagueTeams.logoId
     , leagueTeams.cityName
     , leagueTeams.displayName 
FROM statsSchedules 
JOIN leagueTeams 
WHERE statsSchedules.homeTeamId 
  AND statsSchedules.awayTeamId=leagueTeams.teamId 
ORDER BY statsSchedules.weekIndex ASC

As you can see on this page http://2kolf.com/our-data/schedules-test.php the away teams (on the left) are correct but the name for the home teams are the same as the away team. 
I've tried changing my code to this -
SELECT statsSchedules.*
     , leagueTeams.logoId
     , leagueTeams.cityName
     , leagueTeams.displayName 
FROM statsSchedules 
JOIN leagueTeams 
WHERE statsSchedules.homeTeamId=leagueTeams.teamId 
  AND statsSchedules.awayTeamId=leagueTeams.teamId 
ORDER BY statsSchedules.weekIndex ASC

But that returns nothing.

A:

For each unique Primary Key(PK) / Foreign Key (FK) relationship you have; a join is required. 
Since statsSchedules has two FKs to leagueTeams, you need two leagueTeam Joins.
Since the column names would be the same, I recommend aliasing not only those; but the table join as well.
SELECT statsSchedules.*
     , homeTeam.logoId homeLogoId 
     , homeTeam.cityName homeCityName
     , homeTeam.displayName homeDisplayName
     , awayTeam.logoId awayLogoID
     , awayTeam.cityName awayCityName
     , awayTeam.displayName awayDisplayName
FROM statsSchedules 
INNER JOIN leagueTeams as homeTeam
   ON  statsSchedules.homeTeamId = homeTeam.TeamID
INNER JOIN leagueTeams as awayTeam 
   ON statsSchedules.awayTeamId = awayTeam.teamId 
ORDER BY statsSchedules.weekIndex ASC

