Adrian Schneider
04-07-2005, 03:44 AM
Hi, I'm trying to sort through the data to display 1 team at a time (while gathering tons of other information).
I need to get fc_team.managerid, fc_team.id, fc_team.playerid, fc_player_stats.score, fc_playerownership.playerid, fc_playerownership.roleid.
Table relations:
fc_team.id=fc_playerownership.teamid
fc_player_stats.playerid=fc_playerownership.player id
Field Info:
Each player in a given team will either have a roleid of 1-27, so for each team, there should be 27 players/results.
So basically I need to eval('$fantasy_cricket_teamplayerbit .= "' . fetch_template('fantasy_cricket_teamplayerbit') . '";'); for each unique team, while gathering the scores for each player and have them calculated (there is some math involved here, not just addition) and the TOTAL calculated scores of all players added up and displayed per row along with the manager name.
So how should I do this? I tried using for() but that didn't help much, because I don't know how many rows to set the maximum (depends on the # of results from the query) the score selection messes this up, because it selects every player.
I know I have to use while() on the array, and for() afterwards, but I'm pretty stuck, so any help would be appreciated.
I need to get fc_team.managerid, fc_team.id, fc_team.playerid, fc_player_stats.score, fc_playerownership.playerid, fc_playerownership.roleid.
Table relations:
fc_team.id=fc_playerownership.teamid
fc_player_stats.playerid=fc_playerownership.player id
Field Info:
Each player in a given team will either have a roleid of 1-27, so for each team, there should be 27 players/results.
So basically I need to eval('$fantasy_cricket_teamplayerbit .= "' . fetch_template('fantasy_cricket_teamplayerbit') . '";'); for each unique team, while gathering the scores for each player and have them calculated (there is some math involved here, not just addition) and the TOTAL calculated scores of all players added up and displayed per row along with the manager name.
So how should I do this? I tried using for() but that didn't help much, because I don't know how many rows to set the maximum (depends on the # of results from the query) the score selection messes this up, because it selects every player.
I know I have to use while() on the array, and for() afterwards, but I'm pretty stuck, so any help would be appreciated.