X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=html%2Fshow-tournament.pl;h=9b987a06a1d4f26739066329be5c79071df50801;hb=29b7d13a713879f6a1db0d2040fc37a558d9a330;hp=c359511e54b6b332d76ef899b44f1072cff2e987;hpb=660a220456f2ce18077b86a8838259457dad38da;p=ccbs diff --git a/html/show-tournament.pl b/html/show-tournament.pl index c359511..9b987a0 100755 --- a/html/show-tournament.pl +++ b/html/show-tournament.pl @@ -9,7 +9,7 @@ my $id = $cgi->param('id'); my $dbh = ccbs::db_connect(); -my $tournament = $dbh->selectrow_hashref('SELECT * FROM tournaments WHERE tournament=?', undef, $id); +my $tournament = $dbh->selectrow_hashref('SELECT * FROM tournaments NATURAL JOIN seasons NATURAL JOIN countries NATURAL JOIN machines NATURAL JOIN scoringsystems WHERE tournament=?', undef, $id); # Swoop all the data in in a big join, then order it over to quasi-sane Perl objects. # (round -> parallel -> player -> songs -> title,chosen,score) @@ -59,5 +59,5 @@ for my $score (@$scores) { } ccbs::print_header(); -ccbs::process_template('show-tournament.tmpl', 'Turnering', { tournament => $tournament, rounds => \@rounds }); +ccbs::process_template('show-tournament.tmpl', $tournament->{'tournamentname'}, { tournament => $tournament, rounds => \@rounds }); $dbh->disconnect;