diff options
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]; |