Using Yii, how can I get an array from an Active Record.
Say something like this:
array(\'foo\', \'bar\', \'lala\')
From something like thi
How about:
Yii::app()->db->createCommand() ->setFetchMode(PDO::FETCH_COLUMN,0) ->select("mycolumn") ->from(MyModel::model()->tableSchema->name) ->queryAll();
The result would be:
array('foo', 'bar', 'lala')