From 086ed1db2ec28817b3370481455c84ceaf6448c2 Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Tue, 6 May 2008 20:08:53 -0700 Subject: CLEANUP: removed all calls to mysql functions and replaced them with calls to DB_xxx should be very easy now to change to a different database. also made the code look nicer ;) Signed-off-by: Arun Persaud --- include/welcome.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include/welcome.php') diff --git a/include/welcome.php b/include/welcome.php index 7aeaf78..34709d3 100644 --- a/include/welcome.php +++ b/include/welcome.php @@ -8,16 +8,16 @@ if(!isset($HOST)) /* this outputs the default home page with some extra statistics on it */ $pre[0]=0;$game[0]=0;$done[0]=0; -$r=mysql_query("SELECT COUNT(id) FROM Game GROUP BY status"); +$r=DB_query("SELECT COUNT(id) FROM Game GROUP BY status"); if($r) { - $pre = mysql_fetch_array($r,MYSQL_NUM); - $game = mysql_fetch_array($r,MYSQL_NUM); - $done = mysql_fetch_array($r,MYSQL_NUM); + $pre = DB_fetch_array($r); + $game = DB_fetch_array($r); + $done = DB_fetch_array($r); } -$r=mysql_query("SELECT AVG(datediff(mod_date,create_date)) FROM Game where status='gameover' "); +$r=DB_query("SELECT AVG(datediff(mod_date,create_date)) FROM Game where status='gameover' "); if($r) - $avgage= mysql_fetch_array($r,MYSQL_NUM); + $avgage= DB_fetch_array($r); else $avgage[0]=0; -- cgit v1.2.3-18-g5258