DAO
- CDbCriteria - Задание условия Where
- CDbCommand - Создание SQL
Schema
- CDbSchema::getDbConnection()→createCommand($sql)→queryAll();
- CDbSchema::getDbConnection()→loadTable($realName);
command
- Yii::app()→db→createCommand($sql)→queryAll();
- Yii::app()→db→createCommand()→select('u.*')→from('user u')→where('u.role_id = :role_id', array(':role_id' ⇒ '1'))→queryAll();