From 65d3845752e76b9f1895cd9e2bf1a4fa6021f0af Mon Sep 17 00:00:00 2001 From: arun Date: Sat, 2 Jun 2007 16:25:28 +0000 Subject: added output of average time for a game on the homepage --- index.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 1a825de..0bb04d4 100644 --- a/index.php +++ b/index.php @@ -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(); -- cgit v1.2.3-18-g5258