summaryrefslogtreecommitdiffstats
path: root/db.php
diff options
context:
space:
mode:
authorarun <arun@nubati.net>2007-02-03 04:57:04 +0000
committerarun <arun>2007-02-03 04:57:04 +0000
commit15e85c12f9392246845f5c611f5faafe8660a9e2 (patch)
treecd3d9c99427ce11b60ba2d3ae2acf24a3a85b455 /db.php
parent0ef11ea847d9891e19605e6c93cb4c7296df0a57 (diff)
downloade-DoKo-15e85c12f9392246845f5c611f5faafe8660a9e2.tar.gz
e-DoKo-15e85c12f9392246845f5c611f5faafe8660a9e2.tar.bz2
e-DoKo-15e85c12f9392246845f5c611f5faafe8660a9e2.zip
added session to database
Diffstat (limited to 'db.php')
-rw-r--r--db.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/db.php b/db.php
index 1b047d3..38b788c 100644
--- a/db.php
+++ b/db.php
@@ -512,4 +512,27 @@ function DB_set_startplayer_by_gameid($id,$p)
return;
}
+function DB_get_session_by_gameid($id)
+{
+ $result = mysql_query("SELECT session FROM Game WHERE id=".DB_quote_smart($id));
+ $r = mysql_fetch_array($result,MYSQL_NUM);
+
+ if($r)
+ return $r[0];
+ else
+ return NULL;
+}
+
+function DB_get_max_session()
+{
+ $result = mysql_query("SELECT MAX(session) FROM Game");
+ $r = mysql_fetch_array($result,MYSQL_NUM);
+
+ if($r)
+ return $r[0];
+ else
+ return 0;
+}
+
+
?> \ No newline at end of file