Steven_G - 7:39 pm on Feb 21, 2011 (gmt 0)
I have tried different ways to add this table but to no alas.
This is what i have :-
$get_players = mysql_query("
SELECT P.PlayerID AS id,
P.PlayerLastName AS lastname,
P.PlayerFirstName AS firstname,
P.PlayerNumber AS number,
P.PlayerNationalityID AS nationality,
idihc_playerpositions.PlayerPositionName AS position,
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
WHERE SN.SeasonPublish = 1 AND idihc_playerpositions.PlayerPositionID = idihc_playerpositions.PlayerPositionName and P.PlayerPublish = 1
GROUP BY id
ORDER BY number
I get this error: -
Not unique table/alias: 'idihc_playerpositions'
I have read and re-read the mysql tutorials on Joins however i must be missing something. As per my second post the two joins work very well its just when i add the 'playerposition' join that is causing me the problems.
Thanks in advance