Home  >  Article  >  PHP Framework  >  How to print sql statement in yii

How to print sql statement in yii

王林
王林Original
2020-02-19 15:25:553931browse

How to print sql statement in yii

yii method of printing sql statement:

(recommended tutorial: yii framework)

Specific example:

$commandQuery = clone $model; //$model 实例化的对象
echo $commandQuery->createCommand()->getRawSql();

For more programming-related content, please pay attention to the Programming Introduction column on the php Chinese website!

The above is the detailed content of How to print sql statement in yii. 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