php - SQL JOIN - two teams, one logo database -
i have 2 databases, 1 database(games) contains hometeamid , visitorid. , other database(teams) contains logonames , teamid. (games) hometeamid , visitorid related (teams) teamid. i wanting run sql query outputs teams (games) database shows logos each respective team. want output this. <item> <hometeamid> <home_logo> <visitid> <visitor_logo> </item> when attempting query using php, use select * games left join teams on games.homeid = teams.teamid i can first logo hometeam fine, when use , select * games left join teams on games.homeid = teams.teamid , games.vistorid = teams.teamid i nothing. i able query work, don't logos. let's @ second statement: select * games left join teams on games.homeid = teams.teamid , games.vistorid = teams.teamid you correctly joining 2 tables information need. however, , statement cause homeid = teamid , teamid = visitorid. therefore, can rewr...