예제 #1
0
 public function run($id)
 {
     $duty_info = Duty::model()->findByPk($id);
     if ($duty_info->delete()) {
         $this->controller->success('');
     }
 }
예제 #2
0
파일: Duty.php 프로젝트: WalkerDi/mama
 public static function getList($nurser_id)
 {
     $model = Duty::model();
     //$tableName = $model->tableName();
     $condition = "a.nurser_id = b.id And a.nurser_id={$nurser_id}";
     $command = $model->getDbConnection()->CreateCommand();
     return $command->select('b.name,a.*')->from('t_duty a,t_nurser_user b')->where($condition)->order('a.day_time ASC')->queryAll();
 }