Difference between #3 and #4 of
Using standard filters in CGridView custom fields

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['a
dmuthor_id']; $ids = array(); foreach($am as $a_id) { $ids[] = $a_id->attributes['admuthor_id']; } return $ids; } ```
14 0
16 followers
Viewed: 74 084 times
Version: 1.1
Category: How-tos
Written by: GOsha
Last updated by: jwerner
Created on: Dec 13, 2010
Last updated: 13 years ago
Update Article

Revisions

View all history