diff options
author | arun <arun@nubati.net> | 2007-06-02 16:25:28 +0000 |
---|---|---|
committer | arun <arun> | 2007-06-02 16:25:28 +0000 |
commit | 65d3845752e76b9f1895cd9e2bf1a4fa6021f0af (patch) | |
tree | b7255dfbff31733a17e678b9ec4e6eedaf2ac4c8 /index.php | |
parent | 88321df4d58a8d42f484ec202b0b4ec30f2d4e97 (diff) | |
download | e-DoKo-65d3845752e76b9f1895cd9e2bf1a4fa6021f0af.tar.gz e-DoKo-65d3845752e76b9f1895cd9e2bf1a4fa6021f0af.tar.bz2 e-DoKo-65d3845752e76b9f1895cd9e2bf1a4fa6021f0af.zip |
added output of average time for a game on the homepage
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -1731,7 +1731,14 @@ else if(myisset("me")) $game = mysql_fetch_array($r,MYSQL_NUM); $done = mysql_fetch_array($r,MYSQL_NUM); } - output_home_page($pre[0],$game[0],$done[0]); + + $r=mysql_query("SELECT AVG(datediff(mod_date,create_date)) FROM Game where status='gameover' "); + if($r) + $avgage= mysql_fetch_array($r,MYSQL_NUM); + else + $avgage[0]=0; + + output_home_page($pre[0],$game[0],$done[0],$avgage[0]); } output_footer(); |