For this query, I want to use the given playerid tofindtheplayer'sname,position, and school (playername,position,schoolfieldsrespectively) andappend them to the array. Here'sthecurrentquery Ihave:
Code:
$picks=$DB_site->query("
SELECT draftpicks.*, teams.teamname, players.*
FROM lmd_draftpicks AS draftpicks
LEFT JOIN lmd_teams AS teams ON (teams.teamid = draftpicks.teamid)
LEFT JOIN lmd_players AS players ON (players.playerid = draftpicks.playerid)
WHERE draftpicks.pickid = $selectedpick
ORDER BY pickid ASC");
Is that right? And finally, when I get to the template,howwouldIaccessthe player information? The variable I have to fetchthedatais$info,but the variable given to me in the querybyMarcois$selectedpick. Dothose variables have to be the same name?
I'm going to assume that since there are no conflictingfieldnames,Icanput the default field names in thetemplate($info[school],forexample).
*Crosses fingers, hoping he's doing this right*
(On a side note, I have to give a thumbs down to the"Automergeddoublepost" feature. I'd rather it show up as a new replybecauseotherwise the post gets ignored, and it is messing up thespacing onthe already existing post, but I digress...)
A little update: I got the latter query to work without the where, which allows for the displaying of the entire draft: