Good day guys I have here a cgridview column containing a concatenated keywords from MANY_MANY related table. My problem is that when i tried to filter a specific keyword on the column it loads back an individual word what I wanted to have is the same concat words filtered with the specific keyword search. Thanks in advance this is my codes:
this is my relations
public function relations()
{
return array(
'shisDiagnosis' => array(self::MANY_MANY, 'ShisKeyword',
'shis_diag_key(cons_id, key_id)'),
'shisKeywords' => array(self::MANY_MANY, 'ShisKeyword',
'shis_cons_key(cons_id, key_id)'),
);
}
Over all this looks like the ‘Tag’ search in the Blog tutorial. Maybe you could look at that for some inspiration. Also I have found that if I want to search via a relation, I had to create a Model attribute for example
public $shisDiagnosis_search;
and I used that in the GridView Filter line. Sorry I don’t have my dev machine with me so I can’t explain more. I just searched google for 'Yii gridview sort multiple tables" or something like that.
this is really working the problem is when i search in the field the concatenated data is being remove and it returns the single data before it was concatenated.