Organize tournaments by season.
[ccbs] / html / tournaments.pl
index 1f00a958d3776223baff795fe9555cafecd08972..169d84d1b1c1b0c253b0558433ee05d39a71bc68 100755 (executable)
@@ -5,7 +5,7 @@ use strict;
 use warnings;
 
 my $dbh = ccbs::db_connect();
-my $tournaments = ccbs::db_fetch_all($dbh, 'SELECT * FROM tournaments');
+my $tournaments = ccbs::db_fetch_all($dbh, 'SELECT * FROM tournaments NATURAL JOIN seasons ORDER BY season, date');
 
 ccbs::print_header();
 ccbs::process_template('tournaments.tmpl', 'Turneringer', { tournaments => $tournaments });