X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=html%2Fsong.pl;h=8445bc5f13041627f45dfbcdcf36c6d22335ab10;hp=8369821387032dcb485b51013d0546d5b23d50ed;hb=1c6ee3e8264d2d8d03f470a5781cb8c774336af1;hpb=199031323f6a6773baea49de898f9821ffab3b09 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'}, {