From 342ed812aa375957966f6c9cc18ffa8b311f4e22 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Fri, 18 Feb 2005 15:11:39 +0000 Subject: [PATCH] Don't include NULL scores in the top 50 list. --- html/song.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/song.pl b/html/song.pl index 8369821..8445bc5 100755 --- a/html/song.pl +++ b/html/song.pl @@ -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 $scores = ccbs::db_fetch_all($dbh, 'SELECT * FROM scores NATURAL JOIN players NATURAL JOIN tournaments WHERE song=? ORDER BY score DESC LIMIT 50', $id); +my $scores = ccbs::db_fetch_all($dbh, 'SELECT * FROM scores NATURAL JOIN players NATURAL JOIN tournaments WHERE song=? AND score IS NOT NULL ORDER BY score DESC LIMIT 50', $id); ccbs::print_header(); ccbs::process_template('song.tmpl', $song->{'title'}, { -- 2.39.2