summaryrefslogtreecommitdiffstats
path: root/db.php
diff options
context:
space:
mode:
Diffstat (limited to 'db.php')
-rw-r--r--db.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/db.php b/db.php
index 1c20b8e..bae70cb 100644
--- a/db.php
+++ b/db.php
@@ -771,9 +771,9 @@ function DB_get_PREF($myid)
function DB_get_unused_randomnumbers($userstr)
{
- $queryresult = mysql_query("SELECT randomnumbers,Game.id FROM Game ".
+ $queryresult = mysql_query("SELECT randomnumbers,Game.id, COUNT(*) as num FROM Game ".
" LEFT JOIN Hand ON Hand.game_id=Game.id ".
- " AND user_id not in (".$userstr.")".
+ " AND user_id not in (".$userstr.")".
" GROUP BY Game.id ".
" HAVING num=4");