From: Steinar H. Gunderson Date: Sat, 23 Apr 2005 00:54:57 +0000 (+0000) Subject: Hardcode single-only songs for now. X-Git-Url: https://git.sesse.net/?p=ccbs;a=commitdiff_plain;h=5993426cc359ecede127053736d97714761b9bad;hp=416d3d469d9ce4c15a860f61e24aee79da12402d Hardcode single-only songs for now. --- diff --git a/bigscreen/fetch_max_score_for_players.cpp b/bigscreen/fetch_max_score_for_players.cpp index 3a89541..3aa66b7 100644 --- a/bigscreen/fetch_max_score_for_players.cpp +++ b/bigscreen/fetch_max_score_for_players.cpp @@ -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 playmode='single'" " ORDER BY feetrating DESC LIMIT 1" " ) * 1000 AS max_score FROM tournamentparticipation") ); diff --git a/bigscreen/fetch_max_score_for_songs.cpp b/bigscreen/fetch_max_score_for_songs.cpp index d9a8841..4170e33 100644 --- a/bigscreen/fetch_max_score_for_songs.cpp +++ b/bigscreen/fetch_max_score_for_songs.cpp @@ -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 " - " 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;