public function search()
{
// Warning: Please modify the following code to remove attributes that
// should not be searched.
$criteria=new CDbCriteria;
$criteria->compare('id',$this->id);
$criteria->compare('titolo',$this->titolo,true);
$criteria->compare('testo',$this->testo,true);
$criteria->compare('data',$this->data,true);
return new CActiveDataProvider(get_class($this), array(
'criteria'=>$criteria,
));
You mean I should modify it like this?
public function search()
{
// Warning: Please modify the following code to remove attributes that
// should not be searched.
$criteria=new CDbCriteria;
$criteria->compare('id',$this->id);
$criteria->compare('titolo',$this->titolo,true);
$criteria->compare('testo',$this->testo,true);
$criteria->compare('data',$this->data,true);
return new CActiveDataProvider(get_class($this), array(
'criteria'=>$criteria,
'criteria'=>array(
'order'=>'id DESC'
),
));
Or can I just remove the ‘criteria’=>$criteria and adding mine?