X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=bigscreen%2Ffetch_max_score_for_players.cpp;h=3aa66b7837364ec9e12d6c5d441ffc5a6e9da3ee;hp=9cc9b2ac71cc3f69dd6c6a8c1af5c4b8d4026b26;hb=5993426cc359ecede127053736d97714761b9bad;hpb=8963fce7337a09bdcfea051a81c0c3d9281acd6e diff --git a/bigscreen/fetch_max_score_for_players.cpp b/bigscreen/fetch_max_score_for_players.cpp index 9cc9b2a..3aa66b7 100644 --- a/bigscreen/fetch_max_score_for_players.cpp +++ b/bigscreen/fetch_max_score_for_players.cpp @@ -18,6 +18,7 @@ void FetchMaxScoreForPlayers::operator() (pqxx::transaction<> &t) " WHERE tournament=" + pqxx::to_string(tournament) + " AND song IS NOT NULL" " AND parallel=0" + " AND chosen='f'" " )" " AND (player,song) NOT IN (" // not a song the player has chosen before, or is a random song in this round " SELECT player,song FROM scores" @@ -25,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") );