Use Chtml For This - Ugly Hack! Applying this solution is the best way to find this:
public function queryAll($condition = '', $params = array()) { $criteria = $this->getCommandBuilder()->createCriteria($condition, $params); $this->applyScopes($criteria); $command = $this->getCommandBuilder()->createFindCommand($this->getTableSchema(), $criteria); $results = $command->queryAll(); return $results; }
You can add this code to the ActiveRecord class, for example:
class ActiveRecord extends CActiveRecord {
And, use this method:
return $model->queryAll($criteria);
You can learn more about this link .
Maykonn
source share