Page is a not externally linkable
- Code, Content, and Presentation
-- Databases
---- Joining 3 Msql Tables


LifeinAsia - 8:16 pm on Feb 21, 2011 (gmt 0)


Oops- I missed this the first time through:
FROM idihc_seasons S, idihc_playerpositions
LEFT OUTER JOIN idihc_players P ON P.PlayerID = S.SeasonPlayerID
LEFT OUTER JOIN idihc_seasonnames SN ON SN.SeasonID = S.SeasonID
LEFT OUTER JOIN idihc_playerpositions ON P.PlayerPositionID = idihc_playerpositions.PlayerPositionID

You are joining the same table twice. You can do that, but you'll need to use different table aliases for each one.


Thread source:: http://www.webmasterworld.com/databases_sql_mysql/4269895.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com