createCommand()->getRawSql();" or "$model->find()->createCommand()->getRawSql();" to print sql statements."/> createCommand()->getRawSql();" or "$model->find()->createCommand()->getRawSql();" to print sql statements.">

Home >PHP Framework >YII >How to print sql statements in yii framework

How to print sql statements in yii framework

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-12-09 13:40:332760browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How to sort yii2.0 tablesNext article:How to sort yii2.0 tables