summaryrefslogtreecommitdiffstats
path: root/db.php
diff options
context:
space:
mode:
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