summaryrefslogtreecommitdiffstats
path: root/db.php
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2007-11-27 19:12:39 +0100
committerArun Persaud <arun@nubati.net>2007-11-27 19:12:39 +0100
commit014c31b6a22d4ab2f43eb58ed2acde02042c402b (patch)
tree8eb319a37d9e45ac2a627e63518e5eb0aec9ccbc /db.php
parent9732aef914603924915bde24684f322843ead085 (diff)
downloade-DoKo-014c31b6a22d4ab2f43eb58ed2acde02042c402b.tar.gz
e-DoKo-014c31b6a22d4ab2f43eb58ed2acde02042c402b.tar.bz2
e-DoKo-014c31b6a22d4ab2f43eb58ed2acde02042c402b.zip
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.
Diffstat (limited to 'db.php')
-rw-r--r--db.php3
1 files changed, 2 insertions, 1 deletions
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];