当前位置: 首页>>代码示例>>PHP>>正文


PHP Division::deleteDivTeams方法代码示例

本文整理汇总了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}')";
开发者ID:testt98,项目名称:ebattles,代码行数:31,代码来源:clanprocess.php


注:本文中的Division::deleteDivTeams方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。