How to get generated sql.
Example:
SomeModel::model()->findAll()->getSql();
Thanks,
How to get generated sql.
Example:
SomeModel::model()->findAll()->getSql();
Thanks,
check in protected/runtime/application.log
You need to enable logging for that. The easiest way to do that is to enable debug mode with YII_DEBUG and in your configuration add CWebLogRoute to the routes of your log component. You can also set enableParamLogging to true for your db connection to show the bound parameters for your SQL.
'db'=>array(
// ....
'enableParamLogging' => true,
),
'log'=>array(
'routes'=>array(
array(
'class'=>'CWebLogRoute'
),
),
),