本文整理匯總了PHP中Division::deleteDivTeams方法的典型用法代碼示例。如果您正苦於以下問題:PHP Division::deleteDivTeams方法的具體用法?PHP Division::deleteDivTeams怎麽用?PHP Division::deleteDivTeams使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Division
的用法示例。
在下文中一共展示了Division::deleteDivTeams方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: header
$clan->deleteClan();
}
//echo "-- clandelete --<br />";
header("Location: clans.php");
exit;
}
if (isset($_POST['clandeletediv'])) {
$div_id = $_POST['clandiv'];
$division = new Division($div_id);
$q_DivScores = "SELECT " . TBL_DIVISIONS . ".*, " . TBL_TEAMS . ".*, " . TBL_PLAYERS . ".*, " . TBL_SCORES . ".*" . " FROM " . TBL_DIVISIONS . ", " . TBL_TEAMS . ", " . TBL_PLAYERS . ", " . TBL_SCORES . " WHERE (" . TBL_DIVISIONS . ".DivisionID = '{$div_id}')" . " AND (" . TBL_TEAMS . ".Division = " . TBL_DIVISIONS . ".DivisionID)" . " AND (" . TBL_PLAYERS . ".Team = " . TBL_TEAMS . ".TeamID)" . " AND (" . TBL_SCORES . ".Player = " . TBL_PLAYERS . ".PlayerID)";
$result_DivScores = $sql->db_Query($q_DivScores);
$numDivScores = mysql_numrows($result_DivScores);
if ($numDivScores == 0) {
// Delete players, teams, members and divison
$division->deleteDivPlayers();
$division->deleteDivTeams();
$division->deleteDivMembers();
$division->deleteDiv();
}
//echo "-- clandeletediv --<br />";
header("Location: clanmanage.php?clanid={$clan_id}");
exit;
}
if (isset($_POST['clanadddiv'])) {
$clan_owner = $tp->toDB($_POST['clanowner']);
$div_game = $_POST['divgame'];
$q = "SELECT " . TBL_DIVISIONS . ".*" . " FROM " . TBL_DIVISIONS . " WHERE (" . TBL_DIVISIONS . ".Clan = '{$clan_id}')" . " AND (" . TBL_DIVISIONS . ".Game = '{$div_game}')";
$result = $sql->db_Query($q);
$num_rows = mysql_numrows($result);
if ($num_rows == 0) {
$q = "INSERT INTO " . TBL_DIVISIONS . "(Clan,Game,Captain)" . " VALUES ('{$clan_id}','{$div_game}','{$clan_owner}')";