Hi
I used gii to create my code (CURD) , So i used search method but my problem if I search on any int field will return
result and every thing is OK .
- If I serched on text like " Title in English " will not return any result and page still print same results
Model:
public function search()
{
// Warning: Please modify the following code to remove attributes that
// should not be searched.
$criteria=new CDbCriteria;
$criteria->compare('news_id',$this->news_id);
$criteria->compare('section_id',$this->section_id);
$criteria->compare('course_id',$this->course_id);
$criteria->compare('event_id',$this->event_id);
$criteria->compare('s_text',$this->s_text,true);
$criteria->compare('news',$this->news,true);
$criteria->compare('main_img',$this->main_img,true);
$criteria->compare('t_img',$this->t_img,true);
$criteria->compare('country',$this->country);
$criteria->compare('city',$this->city);
$criteria->compare('i_date',$this->i_date,true);
$criteria->compare('p_date',$this->p_date,true);
$criteria->compare('active',$this->active);
$criteria->compare('visits',$this->visits);
$criteria->order='news_id desc';
return new CActiveDataProvider('News', array(
'criteria'=>$criteria,
));
}
I had no idea why not worked , So I used gii (CURD) to recreate it , but also same problem .
Any idea will help
Thanks in advance