Define Fields On Findall

Hello friends.

I would like defining what fields are show in my find, for example in my table I have this fields:


When I execute in my controller for exemplo:

$data = MyModel::model()->findAll();


I have this result:

Array ( [name] => xxx [email] => yy [password] => zz [date] => zz )

But I Would like to choose the fields:

Array ( [name] => xxx [email] => yy [date] => zz )

How can I do this?

$myModel= MyModel::model()->findAll(array('select'=>'zzz,xx'));

Thank you

Like queries, reports, and correspondence templates, defined fields must be placed into the design.Weu can query on number fields to find all items with numbers within a rangeā€¦