Pos |
Name |
Points |
$query = 'SELECT * , sum( score ) FROM `careerpoints` GROUP BY name ORDER BY `sum( score )` DESC ';
$result=mysql_query($query);
$fnum=mysql_numrows($result);
mysql_close();
$i=0;
while ($i < $fnum) {
$rname=mysql_result($result,$i,"name");
$points=mysql_result($result,$i,"sum( score )");
$extra=1 ;
$pos=$i+$extra ;
?>
echo "$pos"; ?> |
echo "$rname"; ?> |
echo "$points"; ?> |
++$i;
}
echo " ";
?>
|