findAll(array(‘order’=>’somefield’, ‘condition’=>’otherfield=:x’, ‘params’=>array(‘:x’=>$x)));
...Displaying 31-32 of 32 results.
List Of Query Commands for getting Data from database in Yii
Get Single Record.
1. ModelName::model()->findByPk($primaryKey);
2. ModelName::model()->findByAttributes(array(‘columnName1?=>$value1, ‘columnName2?=>$value2));
3. ModelName::model()->find(array(‘condition’=>’columnName1=’.$value1. ‘ and columnName2=’.$value2));
4. Yii::app()->use...