From 014c31b6a22d4ab2f43eb58ed2acde02042c402b Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Tue, 27 Nov 2007 19:12:39 +0100 Subject: [PATCH] BUGIX: games in a session were not ordered by date, but by id when a game gets cancled new games use that game_id in the DB which can mess up the ordering of sessions. fixed now. --- db.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db.php b/db.php index f5f6673..54f5706 100644 --- a/db.php +++ b/db.php @@ -723,7 +723,8 @@ function DB_get_hashes_by_session($session,$user) $result = mysql_query("SELECT Hand.hash FROM Hand". " LEFT JOIN Game ON Game.id=Hand.game_id ". " WHERE Game.session=".DB_quote_smart($session). - " AND Hand.user_id=".DB_quote_smart($user)); + " AND Hand.user_id=".DB_quote_smart($user). + " ORDER BY Game.create_date ASC"); while($t = mysql_fetch_array($result,MYSQL_NUM)) $r[] = $t[0]; -- 2.25.1