CActiveFinder help needed.

hello all,

i am trying to work on querying database with best performance so i decided to use CActiveFinder but there isn’t any examples around. can anyone help me on how to implement CActiveFinder? is it the same way as CActiveRecord? because CActiveFinder don’t implements CModel so i have no idea how to use and implement.

thanks in advanced.

As CActiveRecord uses CActiveFinder internally, and the overhead is really acceptable if you have a well-written backend, using finder in your controllers is discouraged.

If you want to achieve maximum performance, you may want to use DAO instead.

thank you very much.

oh i have another question. why i am unable to retrieve record count with

$criteria=new CDbCriteria();


$criteria->order='name ASC';

$criteria->params=array(':deleted'=>'0000-00-00 00:00:00');


for ‘user’

public function relations()


  return array(









thanks alot…