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)
}
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;
[%# vim:set filetype=html: %]
+ <h2>Generelle fakta</h2>
+
+ <ul>
+ <li>Sesong: [% tournament.seasonname %]</li>
+ <li>Land: [% tournament.countryname %]</li>
+ <li>Sted: [% tournament.location %]</li>
+ <li>Dato: [% tournament.date %]</li>
+ <li>Maskin: [% tournament.machinename %]</li>
+ <li>Scoresystem: [% tournament.scoringsystemname %]</li>
+ </ul>
+
[% FOR r = rounds %]
<h2>Runde [% r.round %]</h2>