I have 2 columns namely name and surname that are concatenated in a column in the CGridView. Now Yii comes standard with an type on inline searching, at the top of each column. Now the name column which contains "concatenated name and surname and two seperate columns in database"
If user types in a word in the name column search i want it to search within the name and surname db column and tread these columns as one value.
Now in the search method I’m not sure how to accomplish this
Could
$criteria->compare('name',$this->name,true);
$criteria->compare('surname',$this->name,true);
be converted to something like
name LIKE '%".$this->name."%' OR surname LIKE '%".$this->name."%'
using $criteria->compare
Any help will be highly appreciated