Good day! Began to study yii. Faced such a problem. I make an example of a blog on the leadership off. the site also became interested in how to execute a query using this class, in which an alias will be added. For example, the query is executed
SELECT * FROM `tbl_post` But if you need
SELECT * , `author_id` AS 'user' FROM `tbl_post` What should I write in the parameters? By default, everything looks like this:
$dataProvider=new CActiveDataProvider('Post'); I searched Google but didn’t find such an example, I’m probably looking bad, tell me who knows, plz)