예제 #1
0
파일: Farmer.php 프로젝트: adsavin/bswshop
 public static function getOptions()
 {
     $model = Farmer::model()->findAll();
     $arr = array();
     foreach ($model as $r) {
         $arr[$r->farmer_id] = $r->farmer_name;
     }
     return $arr;
 }
예제 #2
0
 function actionFarmerDelete($id)
 {
     $this->checkLogin();
     Farmer::model()->deleteByPk((int) $id);
     $this->redirect(array('FarmerIndex'));
 }