Steven_G - 6:16 pm on Feb 21, 2011 (gmt 0)
Thank you for your response, just prior to seeing you response i got the script to work acciendetly by playing around.
Here is what i have done that works.
$get_players = mysql_query("
SELECT P.PlayerID AS id,
P.PlayerLastName AS lastname,
P.PlayerFirstName AS firstname,
P.PlayerPositionID AS position,
P.PlayerNumber AS number,
P.PlayerNationalityID AS nationality,
FROM idihc_seasons S
LEFT OUTER JOIN idihc_players P ON P.PlayerID = S.SeasonPlayerID
LEFT OUTER JOIN idihc_seasonnames SN ON SN.SeasonID = S.SeasonID
WHERE SN.SeasonPublish = 1 and P.PlayerPublish = 1
GROUP BY id
ORDER BY number
My next challenge is to join another table to the above, however if i am understaning you correctly i need to have a unique field between the two tables i am trying to join.
With this one though i would like to display the text data in the second table rather than the id that is linked between them. I can currently get the query to display the 'id' which is the unique filed but it wont change it to the new value.
I have the 'idihc_players' table which has in it 'PlayerPositionID'
I also have 'idihc_playersposition' which has 'PlayerPositionID' and 'PlayerPositionName'
what i wish to display is the 'PlayerPositionName' from the 'id' it finds, however i just get a blank and no data populated.