diff options
author | arun <arun@nubati.net> | 2007-02-03 04:57:04 +0000 |
---|---|---|
committer | arun <arun> | 2007-02-03 04:57:04 +0000 |
commit | 15e85c12f9392246845f5c611f5faafe8660a9e2 (patch) | |
tree | cd3d9c99427ce11b60ba2d3ae2acf24a3a85b455 /db.php | |
parent | 0ef11ea847d9891e19605e6c93cb4c7296df0a57 (diff) | |
download | e-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.php | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -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 |