diff options
author | Arun Persaud <arun@nubati.net> | 2008-05-04 19:40:10 -0700 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2008-05-04 19:40:10 -0700 |
commit | 981c12ce5d5aaf606584a4ab59054316d2b6c6c2 (patch) | |
tree | c6b6d3eda8483a392ea14d3622356d19c3f70b8b /include/db.php | |
parent | 64f953012ebda0912a4e92ff3301f09957019477 (diff) | |
download | e-DoKo-981c12ce5d5aaf606584a4ab59054316d2b6c6c2.tar.gz e-DoKo-981c12ce5d5aaf606584a4ab59054316d2b6c6c2.tar.bz2 e-DoKo-981c12ce5d5aaf606584a4ab59054316d2b6c6c2.zip |
NEW FEATURES: show global statistic
show points/game for all players that have 10 or more games
Signed-off-by: Arun Persaud <arun@nubati.net>
Diffstat (limited to 'include/db.php')
-rw-r--r-- | include/db.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/db.php b/include/db.php index 42d2bef..b13c0f0 100644 --- a/include/db.php +++ b/include/db.php @@ -919,10 +919,15 @@ function DB_get_gameids_of_finished_games_by_session($session) { $ids = array (); - $queryresult = mysql_query("SELECT id FROM Game ". - " WHERE session=$session ". - " AND status='gameover' ". - " ORDER BY create_date ASC"); + if($session==0) /* return all games */ + $queryresult = mysql_query("SELECT id FROM Game ". + " WHERE status='gameover' ". + " ORDER BY create_date ASC"); + else /* return games in a session */ + $queryresult = mysql_query("SELECT id FROM Game ". + " WHERE session=$session ". + " AND status='gameover' ". + " ORDER BY create_date ASC"); $i=0; while($r = mysql_fetch_array($queryresult,MYSQL_NUM) ) |