From 8c9f2736384c0c279019ca41c32da58e127bf572 Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Sun, 29 Jul 2007 19:17:51 -0700 Subject: BUGFIX: order games by session games are now ordered by sessions, also fixed a typo --- db.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'db.php') diff --git a/db.php b/db.php index 867be16..a6b9c3b 100644 --- a/db.php +++ b/db.php @@ -907,9 +907,10 @@ function DB_format_gameid($gameid) $session = DB_get_session_by_gameid($gameid); /* get number of game */ - $result = mysql_query("SELECT COUNT(*),create_date FROM Game WHERE session='$session' ". - " GROUP by session". - " HAVING TIMEDIFF(create_date, (SELECT create_date FROM Game WHERE id='$gameid'))<=0"); + $result = mysql_query("SELECT COUNT(*),create_date FROM Game". + " WHERE session='$session' ". + " AND TIMEDIFF(create_date, (SELECT create_date FROM Game WHERE id='$gameid'))<=0 ". + " GROUP by session"); $r = mysql_fetch_array($result,MYSQL_NUM); return $session.".".$r[0]; -- cgit v1.2.3-18-g5258