Findall Method

I am using the findAll method to group a data by applying certain conditions.I am using this method as follows


I am getting the desired output …

But when I try to define a certain condition such as:


It gives the desired output but doesn’t group as it was desired.Moreover if I use:

$a=A::model->findAll(array(‘order’=>‘id’,‘group’=>‘area’),‘a=b’);The first is processed,but not the second part.

NOTE:I am using a checkbox to render $a

try something as following

$c = new CDbCriteria;

$c->order = "id ASC";

$c->group = "area";