Revision #4 has been created by GOsha on Dec 14, 2010, 6:49:43 PM with the memo:
little changes
« previous (#3) next (#5) »
Changes
Title
unchanged
Using standard filters in CGridView custom fields
Category
unchanged
How-tos
Yii version
unchanged
Tags
unchanged
CGridView, interface, filters, search
Content
changed
[...]
$criteria->select='author_id';
$criteria->distinct = true;
$criteria->compare('author_login',$author,true);
$am=authorsModel::model()->findAll($criteria);
if(empty($am)) return 0;
if(count($am) == 1) return $am[0]->attributes['admuthor_id'];
$ids = array();
foreach($am as $a_id)
{
$ids[] = $a_id->attributes['a
dmuthor_id'];
}
return $ids;
}
```