Find in Yii 1.0

Find Command

< ?php $model = User::model()->find(); ? >

Find Command Condition

< ?php $model = User::model->find('userid=1 AND status="A");? >

Find Command condition with params

< ?php $model = User::model()->find('userid=:userId and status=:Status',array(':userId'=>;1,':status'=>'A'));? >

Leave a Reply