show total score on statistic site
This commit is contained in:
@@ -81,7 +81,18 @@ function get_teams($con) {
|
||||
$stmt->execute();
|
||||
$stmt->setFetchMode(PDO::FETCH_ASSOC);
|
||||
return $stmt;
|
||||
} catch(PDOExeption $e) {
|
||||
} catch(PDOException $e) {
|
||||
handle_pdo_exception($e);
|
||||
}
|
||||
}
|
||||
|
||||
function get_total_score($con) {
|
||||
try {
|
||||
$stmt = $con->prepare("SELECT M.name as Mannschaftsname, M.feuerwehr as Feuerwehr, SUM(P.punkte) as Gesamtpunkte FROM Punkte as P, Mannschaft as M WHERE P.m_id = M.m_id GROUP BY M.m_id ORDER BY Gesamtpunkte DESC");
|
||||
$stmt->execute();
|
||||
$stmt->setFetchMode(PDO::FETCH_ASSOC);
|
||||
return $stmt;
|
||||
} catch(PDOException $e) {
|
||||
handle_pdo_exception($e);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user