Thanks Link, that worked.
Since I had to get this to work on a per match basis (game = parent) I threw a while(matchquery) around it. Then I threw each team into an array to display so I can get it to display what I need (but that works).
Well since I did that, somewhere along the way the part that seperates teams stopped working.
I'll post that section of the code, and the $array values in a link.
PHP Code:
while($teaminfo = $DB_site->fetch_array($viewteams))
{
$array[$teaminfo[id]]['blah'] = $teaminfo['blah'];
$array[$teaminfo[id]]['rows'][] = $teaminfo;
}
// Process Each Team
foreach ($array as $id => $team)
{
// Process Each Player
foreach ($team['rows'] as $row)
{
...
}
// calculations, etc
}
I'm pretty sure the blah stuff didn't affect it, anyway here are the 2 arrays.
http://world-a-team.com/aj/fantasy_c...id=20&show=yes
So everytime the roleid hits 27 and resets, it should be a new team.
** solved
thanks MarcoH64