summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2015-11-29 15:51:54 -0800
committerArun Persaud <arun@nubati.net>2015-11-29 21:19:07 -0800
commit4afb2915193523f99f360e27477afefcb19ed079 (patch)
tree47574f0f30a634585e633a891d3d3e646e0dc423 /include
parente2db7fab7569c20afa4f7915edb70842ae1aed8e (diff)
downloade-DoKo-4afb2915193523f99f360e27477afefcb19ed079.tar.gz
e-DoKo-4afb2915193523f99f360e27477afefcb19ed079.tar.bz2
e-DoKo-4afb2915193523f99f360e27477afefcb19ed079.zip
reuse random number: test select distinct
Diffstat (limited to 'include')
-rw-r--r--include/db.php2
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;");