本文整理汇总了PHP中DBModel::deleteTeam方法的典型用法代码示例。如果您正苦于以下问题:PHP DBModel::deleteTeam方法的具体用法?PHP DBModel::deleteTeam怎么用?PHP DBModel::deleteTeam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBModel
的用法示例。
在下文中一共展示了DBModel::deleteTeam方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setTeamState
/**
* Dismiss a team.
* @param string team id
*/
public function setTeamState($team_id, $statecode)
{
$team = DBModel::getTeamDetail($team_id);
$ulist = $team['teammate'];
foreach ($ulist as $u) {
$this->rollback($u['id'], $statecode);
}
DBModel::updateDB('cernet_team', array('id' => $team_id), array('statecode' => $statecode));
if ($statecode < 3) {
DBModel::deleteTeam($team_id);
// xassert($this->teammodel->where($conf)->delete(), Error('delete'));
}
}
示例2: deleteteam_
/**
* Delete my own team.
*/
public function deleteteam_()
{
eval(USER);
try {
$team_id = DBModel::getTeamByUser(session('userid'));
$model = new AdminModel();
$model->setTeamState($team_id, 2);
// state 3: building team.
DBModel::deleteTeam($team_id);
echo "success";
} catch (Exception $e) {
echo $e->getMessage();
}
}