Fix rank order...

This commit is contained in:
nemunaire 2016-01-24 14:32:36 +01:00
parent 3f10eeef64
commit 7f9581f578
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ func (t Team) GetPoints() (int64, error) {
}
func GetRank() (map[int64]int, error) {
if rows, err := DBQuery("SELECT id_team, SUM(E.gain) AS score, MAX(S.time) FROM exercice_solved S INNER JOIN exercices E ON E.id_exercice = S.id_exercice GROUP BY id_team HAVING score > 0 ORDER BY score ASC, time ASC"); err != nil {
if rows, err := DBQuery("SELECT id_team, SUM(E.gain) AS score, MAX(S.time) FROM exercice_solved S INNER JOIN exercices E ON E.id_exercice = S.id_exercice GROUP BY id_team HAVING score > 0 ORDER BY score DESC, time ASC"); err != nil {
return nil, err
} else {
defer rows.Close()