I have a model, and a method in my model. It’s simply retuns a new CActiveDataProvider after I set the CDbCriteria. In criteria there are some variables, which is not the part of the AR, because they are ALIAS fields eg: (SUM(xyz) etc…)
I made some pubic variable for my model, to use this in my query.
In my view file I use CGridView to represents these datas. It works correctly, fut the SEARCH / FILTER fields not.
If i try to filter the result nothing happens, but the GET send the params correctly - I see it on firebug params tab.
It send my own variable, and in the controller there is a setting row:
$dataProvider = new MyModel('myFunction');
$dataProvider->attributes = $_REQUEST['MyModel'];
… but it seems to me that “$dataProvider->attributes” doesn’t save my variables to the model…
I tried to get answer by google but i gave up after a day…
PLEASE someone tell me how can I solve this problem!!!
I read the post you sent… I think my code is correct.
I suppose that my problem about the part of the attributes save. In my model method, when I try to print_r $this->attributes or $this->attributeNames it lists just the original array items.My public variables aren’t in the array.