From f3e1d3c28ccb302af953bc27c303c5256cc4e60e Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 14 Feb 2005 20:38:03 +0000 Subject: [PATCH] Correct number of qualified people from round >= 1. --- html/show-tournament.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/show-tournament.pl b/html/show-tournament.pl index 30c1e51..55bd2b4 100755 --- a/html/show-tournament.pl +++ b/html/show-tournament.pl @@ -71,7 +71,7 @@ if ($num_rounds == 0) { my $ref = $dbh->selectrow_hashref('SELECT COUNT(*) AS num_participants FROM tournamentparticipation WHERE tournament=?', undef, $id); $num_qualified = $ref->{'num_participants'}; } else { - my $ref = $dbh->selectrow_hashref('SELECT numqualifying FROM rounds WHERE tournament=? AND round=?', undef, $id, $num_rounds); + my $ref = $dbh->selectrow_hashref('SELECT SUM(numqualifying) AS numqualifying FROM rounds NATURAL JOIN groups WHERE tournament=? AND round=?', undef, $id, $num_rounds); $num_qualified = $ref->{'numqualifying'}; } -- 2.39.2