]> git.sesse.net Git - ccbs/commitdiff
Limited the song highscore list to 50 people.
authorSteinar H. Gunderson <sesse@samfundet.no>
Fri, 18 Feb 2005 13:36:38 +0000 (13:36 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Fri, 18 Feb 2005 13:36:38 +0000 (13:36 +0000)
html/song.pl

index 1b1be39192e1a88aa483acfcb79033e8b0320cc7..8369821387032dcb485b51013d0546d5b23d50ed 100755 (executable)
@@ -10,7 +10,7 @@ my $id = $cgi->param('id');
 my $dbh = ccbs::db_connect();
 
 my $song = $dbh->selectrow_hashref('SELECT * FROM songs WHERE song=?', undef, $id);
 my $dbh = ccbs::db_connect();
 
 my $song = $dbh->selectrow_hashref('SELECT * FROM songs WHERE song=?', undef, $id);
-my $scores = ccbs::db_fetch_all($dbh, 'SELECT * FROM scores NATURAL JOIN players NATURAL JOIN tournaments WHERE song=? ORDER BY score DESC', $id);
+my $scores = ccbs::db_fetch_all($dbh, 'SELECT * FROM scores NATURAL JOIN players NATURAL JOIN tournaments WHERE song=? ORDER BY score DESC LIMIT 50', $id);
 
 ccbs::print_header();
 ccbs::process_template('song.tmpl', $song->{'title'}, {
 
 ccbs::print_header();
 ccbs::process_template('song.tmpl', $song->{'title'}, {