join together true
if use the following code public function search() { // @todo Please modify the following code to remove attributes that should not be searched. $group=filter_var($_REQUEST['group'], FILTER_SANITIZE_STRING); $criteria=new CDbCriteria; $user_id = Yii::app()->user->id; //.namedie() $criteria->compare('id',$this->id); $criteria->compare('title',$this->title,true); $criteria->with = [ 'MeetingParticipants' => [ 'together' => true, 'with' => [ 'group' ] ] ]; //$criteria->together=true; //$criteria->compare('meeting_room_id',$this->meeting_room_id); if(isset($this->start_time) && !empty($this->start_time)) $criteria->compare('start_time',date("Y-m-d", strtotime($this->start_time)), true); //$criteria->compare('end_time',$this->end_time,true); $criteria->compare('created_by',$user_id); // if(isset($group) && !empty($group)) if(isset($group)&&!empty($group)) $criteria->compare('group.group_name',$group); //$criteria->compare('created_on',$this->created_on,true); return new CActiveDataProvider($this, array( 'criteria'=>$criteria, )); }
- Added
- 2020-04-16
- Views
- 1
- Type
- image/png
- Size
- 20 KB
Share
Camera / EXIF
- Dimensions
- 1038 × 269