Esempio n. 1
0
	private function loadModel($id)
	{
		$model=ImgType::model()->findByPk($id);
		if($model===null)
			throw new CHttpException(404,'The requested page does not exist.');
		return $model;
	}
Esempio n. 2
0
	public function getSonByPid($pid)
	{
		$cateArr = ImgType::model()->findAll(array(
				'select'=>'id,descript',
				'condition'=>"pid=$pid",
		));
		return $cateArr;
	}