summaryrefslogtreecommitdiffstats
path: root/include/db.php
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2009-03-29 11:11:20 -0700
committerArun Persaud <arun@nubati.net>2009-03-29 11:11:20 -0700
commite3b15417c99b27677a56eae5d26779f90b48adf8 (patch)
tree30d0bf0edf5acd3bb66bb07bb5942f757310dab9 /include/db.php
parent6421e4b1197e105e5dabc14c09679b6321f23acd (diff)
downloade-DoKo-e3b15417c99b27677a56eae5d26779f90b48adf8.tar.gz
e-DoKo-e3b15417c99b27677a56eae5d26779f90b48adf8.tar.bz2
e-DoKo-e3b15417c99b27677a56eae5d26779f90b48adf8.zip
CLEANUP: deleted unused functions
games are not deleted from the DB anymore, so we don't need this function.
Diffstat (limited to 'include/db.php')
-rw-r--r--include/db.php28
1 files changed, 0 insertions, 28 deletions
diff --git a/include/db.php b/include/db.php
index ef902ad..da005a1 100644
--- a/include/db.php
+++ b/include/db.php
@@ -266,34 +266,6 @@ function DB_get_gameid_by_hash($hash)
return 0;
}
-function DB_cancel_game($hash)
-{
- $gameid = DB_get_gameid_by_hash($hash);
-
- if(!$gameid)
- return;
-
- /* get the IDs of all players */
- $result = DB_query("SELECT id FROM Hand WHERE game_id=".DB_quote_smart($gameid));
- while($r = DB_fetch_array($result))
- {
- $id = $r[0];
-
- $tmp = DB_query_array("SELECT id FROM Hand_Card WHERE hand_id=".DB_quote_smart($id));
- DB_query("DELETE FROM Play WHERE hand_card_id=".DB_quote_smart($tmp[0]));
-
- DB_query("DELETE FROM Hand_Card WHERE hand_id=".DB_quote_smart($id));
- DB_query("DELETE FROM Hand WHERE id=".DB_quote_smart($id));
- }
-
- /* delete game */
- DB_query("DELETE FROM User_Game_Prefs WHERE game_id=".DB_quote_smart($gameid));
- DB_query("DELETE FROM Trick WHERE game_id=".DB_quote_smart($gameid));
- DB_query("DELETE FROM Game WHERE id=".DB_quote_smart($gameid));
-
- return;
-}
-
function DB_get_hand($me)
{
$cards = array();