diff options
author | Arun Persaud <arun@nubati.net> | 2009-01-18 12:01:24 -0800 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2009-01-18 12:01:24 -0800 |
commit | 8a9ed1ff99fcb888818c2efec5807a8a3e896e04 (patch) | |
tree | 81a3e81d3cfe12fccd12754c4ed97711f62e420f /include/db.php | |
parent | ad182154235ff016634c998e52875721f00c4eb0 (diff) | |
download | e-DoKo-8a9ed1ff99fcb888818c2efec5807a8a3e896e04.tar.gz e-DoKo-8a9ed1ff99fcb888818c2efec5807a8a3e896e04.tar.bz2 e-DoKo-8a9ed1ff99fcb888818c2efec5807a8a3e896e04.zip |
BUGFIX: error in card dealing routine
same hand got dealt twice due to an error in the new routine. Fixed it, but slowed it down
again to roughly 2s per request.
Diffstat (limited to 'include/db.php')
-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 6d4080c..6e1af93 100644 --- a/include/db.php +++ b/include/db.php @@ -820,7 +820,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 id IN (SELECT game_id FROM Hand WHERE user_id IN (".$userstr."));"); + 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."));"); $r = DB_query_array("SELECT randomnumbers FROM gametmp LIMIT 1;"); DB_query("DROP TEMPORARY TABLE IF EXISTS gametmp;"); |