private function _playerDel() { if ($this->_modelPlayerFaq->deleteById($_GET['Id'])) { $faqCount = $this->_modelPlayerFaq->findCount("kind_id={$_GET['kind_id']} and status !=1"); $this->_modelPlayerKindFaq->update(array('count' => $faqCount), "Id={$_GET['kind_id']}"); //数量减1 $this->_utilMsg->showMsg(false); } else { $this->_utilMsg->showMsg(Tools::getLang('DEL_ERROR', __CLASS__), -2); } }
/** * FAQ删除 */ public function actionPlayerDel() { if (!$this->_isAjax()) { return false; } if ($this->_modelPlayerFaq->deleteById($_GET['Id'])) { $this->_modelPlayerKindFaq->update(array('count' => 'count-1'), "Id={$_GET['kind_id']}"); //数量减1 $this->_returnAjaxJson(array('status' => 1)); } }