STANDINGS
Current Date is: Fri 04.19.2024
Pos |
Name |
Points |
$query = mysql_query("SELECT * , sum(score)+sum(bonus) as total FROM `2016btsseasontotals` GROUP BY name ORDER BY total DESC ");
$position_current = 0;
$position_count = 0;
$points_current = 0;
while ($row=mysql_fetch_array($query)) {
//Set position count
$position_count++;
if ($points_current !== $row['total']) {
//New position
$points_current = $row['total'];
$position_current = $position_count;
}
//Display the current position
echo "$position_current | {$row['name']} | {$row['total']} | ";
}
echo " " ;
?>
|