public function loadModel($id) { $model = FAI_TICKETS::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
public function loadModel($id) { $model = FAI_TICKETS::model()->find(array('select' => '*', 'condition' => 'id=:id AND memb___id=:memb___id', 'params' => array(':id' => $id, ':memb___id' => Yii::app()->user->username))); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }