本文整理匯總了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();
}
}