From: Arun Persaud Date: Tue, 27 Nov 2007 18:12:39 +0000 (+0100) Subject: BUGIX: games in a session were not ordered by date, but by id X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=014c31b6a22d4ab2f43eb58ed2acde02042c402b;p=e-DoKo.git 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. --- 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];