if you don't want to create new tables for various reasons,
you would have to use a query like this:
"SELECT count(pts) AS score FROM players WHERE (player1='$player1) OR (player2='$player2) OR ... OR (player11='$player11')"
do this for every team (in a loop)
each time retrieve the total score of a team with
$row = mysql_fetch_array($result);
$score[] = $row['score'];
afterwards, all scores are stored in the array $score, in the same order as the teams.
now some kind of sort/search function is needed, which sorts the scores and keeps the
corresponding teamname
Did anyone understand more than 10% I've written? :rolleyes: