summaryrefslogtreecommitdiffstats
path: root/include/welcome.php
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2008-05-06 20:08:53 -0700
committerArun Persaud <arun@nubati.net>2008-05-06 21:39:01 -0700
commit086ed1db2ec28817b3370481455c84ceaf6448c2 (patch)
tree06111f54d262f69a5e3ff82f59d80b2e7bc5e73f /include/welcome.php
parenta0f87f33ef571a47b143ae06530b64c8496f2f6e (diff)
downloade-DoKo-086ed1db2ec28817b3370481455c84ceaf6448c2.tar.gz
e-DoKo-086ed1db2ec28817b3370481455c84ceaf6448c2.tar.bz2
e-DoKo-086ed1db2ec28817b3370481455c84ceaf6448c2.zip
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 <arun@nubati.net>
Diffstat (limited to 'include/welcome.php')
-rw-r--r--include/welcome.php12
1 files changed, 6 insertions, 6 deletions
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;