I have a CGridView which includes a table column that is linked through the relations method of the model
'cat'=>array(self::BELONGS_TO, 'Cat', 'cat_id','joinType'=>'INNER JOIN'),
I want to make this column searchable, but am not sure how to adapt the search method to do this. How do I access the related column? Currently I have:
$criteria=new CDbCriteria; $criteria->with = array('cat'); ... $criteria->compare('cat.name',<img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />???);
The view code simply includes ‘cat.name’, as a column to display the column.