createCommand()->getRawSql();" or "$model->find()->createCommand()->getRawSql();" to print sql statements."/> createCommand()->getRawSql();" or "$model->find()->createCommand()->getRawSql();" to print sql statements.">
Home > Article > PHP Framework > How to print sql statements in yii framework
Model::find()->createCommand()->getRawSql();
or
$model->find()->createCommand()->getRawSql();
PHP Chinese website has a large number of free Yii introductory tutorials, everyone is welcome to learn!
The above is the detailed content of How to print sql statements in yii framework. For more information, please follow other related articles on the PHP Chinese website!