summaryrefslogtreecommitdiffstats
path: root/db.php
diff options
context:
space:
mode:
Diffstat (limited to 'db.php')
-rw-r--r--db.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/db.php b/db.php
index 646f004..4afa9e1 100644
--- a/db.php
+++ b/db.php
@@ -939,5 +939,17 @@ function DB_set_reminder($user,$gameid)
return 0;
}
+function DB_is_session_active($session)
+{
+ $queryresult = mysql_query("SELECT COUNT(*) FROM Game ".
+ " WHERE session=$session ".
+ " AND status<>'gameover' ");
+
+ $r = mysql_fetch_array($queryresult,MYSQL_NUM);
+ if($r)
+ return $r[0];
+ else
+ return -1;
+}
?> \ No newline at end of file