2007 World Cup women ranking

for ($task=1;$task {
$pts = db_result(db_query("SELECT MAX(T$task) from 2007_SCORE_PWC"));
if ($pts==0) { $task--; break; }
}
print "Ranking updated after task $task

";

$mytable = array();

// Title
$myheader = array("Rank","Overall","Name","Nation","Glider","Points");

$myquery = db_query("SELECT * from 2007_SCORE_PWC where OVERALL>0 AND FEM=TRUE order by PWC_RANK");

$rank = 0;
while ($myresult = db_fetch_array($myquery))
{
$rank++;
$mytable[] = array($rank, $myresult["PWC_RANK"], "".$myresult["SURNAME"]." ".$myresult["FIRST_NAME"]."", $myresult["NAT"], $myresult["GLIDER"], $myresult["OVERALL"]);
}

echo theme_table($myheader, $mytable);

?>