$criteria=new CDbCriteria;
$criteria->alias = 'de';
$criteria->select = 'expences_type.type AS expences_type_name,de.id,de.driver_id,de.details,de.comment,de.price';
$criteria -> join = "inner join expences_type on expences_type.id = de.expences_type ";
$criteria->compare('id',$this->id);
$criteria->compare('driver_id',$this->driver_id);
$criteria->compare('expences_type',$this->expences_type);
$criteria->compare('details',$this->details,true);
$criteria->compare('comment',$this->comment,true);
$criteria->compare('price',$this->price,true);
$criteria->compare('request_date',$this->request_date,true);
$criteria->compare('paid_date',$this->paid_date,true);
$criteria->compare('update_date',$this->update_date,true);
$criteria->compare('update_by',$this->update_by);
$criteria->compare('create_date',$this->create_date,true);
$criteria->compare('create_by',$this->create_by);
$criteria->compare('expences_type.type',$this->expences_type_name);
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
));
$criteria->alias = 'de';
$criteria->select = 'expences_type.type AS expences_type_name,de.id,de.driver_id,de.details,de.comment,de.price';
$criteria -> join = "inner join expences_type on expences_type.id = de.expences_type ";
$criteria->compare('id',$this->id);
$criteria->compare('driver_id',$this->driver_id);
$criteria->compare('expences_type',$this->expences_type);
$criteria->compare('details',$this->details,true);
$criteria->compare('comment',$this->comment,true);
$criteria->compare('price',$this->price,true);
$criteria->compare('request_date',$this->request_date,true);
$criteria->compare('paid_date',$this->paid_date,true);
$criteria->compare('update_date',$this->update_date,true);
$criteria->compare('update_by',$this->update_by);
$criteria->compare('create_date',$this->create_date,true);
$criteria->compare('create_by',$this->create_by);
$criteria->compare('expences_type.type',$this->expences_type_name);
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
));
No comments:
Post a Comment