From 2e8c3d2f5f162a8ab68c4e979c57295f21dd366f Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Tue, 16 Oct 2007 17:22:08 +0200 Subject: [PATCH 1/1] Fix the ordering of almost-equal games on the front page. --- www/index.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/index.pl b/www/index.pl index c31200a..80c874b 100755 --- a/www/index.pl +++ b/www/index.pl @@ -65,6 +65,7 @@ my @last_games = (); $q = $dbh->prepare(' select * from ( select + gametime as sort_gametime, to_char(gametime, \'IYYY-MM-DD HH24:MI\') as gametime, \'Double\' as type, team1_username1 || \' / \' || team1_username2 as username1, @@ -91,6 +92,7 @@ select * from ( and re.team2_username2=ra4.username union all select + gametime as sort_gametime, to_char(gametime, \'IYYY-MM-DD HH24:MI\') as gametime, \'Single\' as type, username1, @@ -110,7 +112,7 @@ select * from ( on re.gametime=ra2.ratetime and re.username2=ra2.username ) t1 -order by gametime desc limit 10'); +order by sort_gametime desc limit 10'); $q->execute(); while (my $ref = $q->fetchrow_hashref) { if (defined($ref->{'diff2'})) { -- 2.39.2