Team Standings
prepare("
SELECT team_name, SUM(total_score) as total_score
FROM scores
WHERE course_id = ? AND team_name IS NOT NULL AND team_name != ''
GROUP BY team_name
ORDER BY total_score ASC
");
$stmt->execute([$selected_course_id]);
$team_results = $stmt->fetchAll();
} catch (PDOException $e) {
$team_results = [];
}
} else {
$team_results = [];
}
?>
| Rank |
Team |
Total Score |
| No team results yet. |
$row): ?>
|
|
|