diff options
-rw-r--r-- | include/db.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/db.php b/include/db.php index b84a3ae..fa7d564 100644 --- a/include/db.php +++ b/include/db.php @@ -918,7 +918,7 @@ function DB_get_unused_randomnumbers($userstr) */ DB_query("DROP TEMPORARY TABLE IF EXISTS gametmp;"); DB_query("CREATE TEMPORARY TABLE gametmp SELECT id,randomnumbers FROM Game;"); - DB_query("DELETE FROM gametmp WHERE randomnumbers IN (SELECT randomnumbers FROM Hand LEFT JOIN Game ON Game.id=game_id WHERE user_id IN (".$userstr."));"); + DB_query("DELETE FROM gametmp WHERE id IN (SELECT distinct game_id FROM Hand LEFT JOIN Game ON Game.id=game_id WHERE user_id IN (".$userstr."));"); $r = DB_query_array("SELECT randomnumbers FROM gametmp LIMIT 1;"); DB_query("DROP TEMPORARY TABLE IF EXISTS gametmp;"); |