diff options
-rw-r--r-- | db.php | 5 | ||||
-rw-r--r-- | functions.php | 4 | ||||
-rw-r--r-- | index.php | 5 |
3 files changed, 9 insertions, 5 deletions
@@ -264,11 +264,14 @@ function DB_set_sickness_by_hash($me,$sickness) function DB_get_current_trickid($gameid) { + $trickid = NULL; + $sequence = NULL; + $result = mysql_query("SELECT Trick.id,MAX(Play.sequence) FROM Play ". "LEFT JOIN Trick ON Play.trick_id=Trick.id ". "WHERE Trick.game_id=".DB_quote_smart($gameid)." ". "GROUP BY Trick.id"); - while( $r = mysql_fetch_array($result,MYSQL_NUM) ) + while( $r = mysql_fetch_array($result,MYSQL_NUM) ) { $trickid = $r[0]; $sequence = $r[1]; diff --git a/functions.php b/functions.php index a530177..0168ce3 100644 --- a/functions.php +++ b/functions.php @@ -6,7 +6,7 @@ $host = "http://doko.nubati.net/database/index.php"; $wiki = "http://wiki.nubati.net/index.php?title=EmailDoko"; -$debug = 1; +$debug = 0; $last=-2; @@ -420,7 +420,7 @@ function display_news() global $wiki; echo "<div class=\"bug\"> ". "Please hit shift+reload.<br /><hr />". - "New Database backend, lost a few features on the way.<br /><hr />". + "Fixed a few bugs, comments might be working again <br /><hr />". "If you find more bugs, please list them in the <a href=\"".$wiki. "\">wiki</a>.</div>\n"; return; @@ -232,7 +232,7 @@ else if(isset($_REQUEST["me"])) break; case 'check': - echo "no checking at the moment... you need to play a normal game"; + echo "no checking at the moment... you need to play a normal game. At the moment you need to reload this page to finish the setup."; if(!isset($_REQUEST["solo"]) || !isset($_REQUEST["wedding"]) || !isset($_REQUEST["poverty"]) || @@ -307,7 +307,8 @@ else if(isset($_REQUEST["me"])) " Hand.position as position,". " Play.sequence as sequence, ". " Hand.hash as hash, ". - " Trick.id ". + " Trick.id, ". + " Comment.comment ". "FROM Trick ". "LEFT JOIN Play ON Trick.id=Play.trick_id ". "LEFT JOIN Hand_Card ON Play.hand_card_id=Hand_Card.id ". |