diff options
author | Arun Persaud <arun@nubati.net> | 2007-07-29 19:17:51 -0700 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2007-07-29 19:21:30 -0700 |
commit | 8c9f2736384c0c279019ca41c32da58e127bf572 (patch) | |
tree | ee9894bb22f60c7e936848595d5c830bd8c140de /db.php | |
parent | 2e9d5e97305ccbd1b975013511922f924d53fffd (diff) | |
download | e-DoKo-8c9f2736384c0c279019ca41c32da58e127bf572.tar.gz e-DoKo-8c9f2736384c0c279019ca41c32da58e127bf572.tar.bz2 e-DoKo-8c9f2736384c0c279019ca41c32da58e127bf572.zip |
BUGFIX: order games by session
games are now ordered by sessions, also fixed a typo
Diffstat (limited to 'db.php')
-rw-r--r-- | db.php | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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]; |