summaryrefslogtreecommitdiffstats
path: root/db.php
diff options
context:
space:
mode:
authorarun <arun@nubati.net>2007-01-12 15:21:14 +0000
committerarun <arun>2007-01-12 15:21:14 +0000
commit1609d836dc4157e318707b6a5a859f42b527b0cf (patch)
treec89e522e34f74c07b1cc7125c9e6153f5aa0ce9b /db.php
parentb8227ddb12516d5bdb0db8a3ec46083b02caee79 (diff)
downloade-DoKo-1609d836dc4157e318707b6a5a859f42b527b0cf.tar.gz
e-DoKo-1609d836dc4157e318707b6a5a859f42b527b0cf.tar.bz2
e-DoKo-1609d836dc4157e318707b6a5a859f42b527b0cf.zip
added some checks for poverty and wedding, but only nines are handled correctly from now on
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 88be2a3..45f5eff 100644
--- a/db.php
+++ b/db.php
@@ -236,6 +236,18 @@ function DB_get_hand_status_by_userid_and_gameid($uid,$gid)
return 0;
}
+function DB_get_sickness_by_userid_and_gameid($uid,$gid)
+{
+ $result = mysql_query("SELECT sickness FROM Hand WHERE user_id=".DB_quote_smart($uid).
+ " AND game_id=".DB_quote_smart($gid));
+ $r = mysql_fetch_array($result,MYSQL_NUM);
+
+ if($r)
+ return $r[0];
+ else
+ return 0;
+}
+
function DB_get_gameid_by_hash($hash)
{
$result = mysql_query("SELECT game_id FROM Hand WHERE hash=".DB_quote_smart($hash));