]> git.sesse.net Git - ccbs/commitdiff
Hardcode single-only songs for now.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 23 Apr 2005 00:54:57 +0000 (00:54 +0000)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 23 Apr 2005 00:54:57 +0000 (00:54 +0000)
bigscreen/fetch_max_score_for_players.cpp
bigscreen/fetch_max_score_for_songs.cpp

index 3a89541aa65a19f50f79145e7ea4cf785eae5ebd..3aa66b7837364ec9e12d6c5d441ffc5a6e9da3ee 100644 (file)
@@ -26,6 +26,7 @@ void FetchMaxScoreForPlayers::operator() (pqxx::transaction<> &t)
                "          AND song IS NOT NULL" +
                "          AND ( chosen='t' OR round=" + pqxx::to_string(round) + " )"
                "       )"
                "          AND song IS NOT NULL" +
                "          AND ( chosen='t' OR round=" + pqxx::to_string(round) + " )"
                "       )"
+               "     AND playmode='single'"
                "     ORDER BY feetrating DESC LIMIT 1"      
                "  ) * 1000 AS max_score FROM tournamentparticipation") );
        
                "     ORDER BY feetrating DESC LIMIT 1"      
                "  ) * 1000 AS max_score FROM tournamentparticipation") );
        
index d9a8841918dfda2a31134e02873668d386201eff..4170e33ea552f3c525680ecf3657022fb231ce44 100644 (file)
@@ -8,7 +8,7 @@ void FetchMaxScoreForSongs::operator() (pqxx::transaction<> &t)
        score->erase(score->begin(), score->end());
        
        pqxx::result res( t.exec("SELECT song,MAX(feetrating)*1000 AS max_score FROM songratings WHERE " 
        score->erase(score->begin(), score->end());
        
        pqxx::result res( t.exec("SELECT song,MAX(feetrating)*1000 AS max_score FROM songratings WHERE " 
-               " machine=( SELECT machine FROM tournaments WHERE tournament=" + pqxx::to_string(tournament) + ") GROUP BY song") );
+               " machine=( SELECT machine FROM tournaments WHERE tournament=" + pqxx::to_string(tournament) + ") AND playmode='single' GROUP BY song") );
        
        for (pqxx::result::const_iterator i = res.begin(); i != res.end(); ++i) {
                unsigned song, max_score;
        
        for (pqxx::result::const_iterator i = res.begin(); i != res.end(); ++i) {
                unsigned song, max_score;