queryAll();]."/> queryAll();].">
Home >PHP Framework >YII >How to execute native sql statement query in yii2
Execution:
Yii::$app->getDb()->createCommand("Your SQL")->execute();
(Recommended tutorial: yii framework)
Query:
Yii::$app->getDb()->createCommand("Your SQL")->queryAll();
Others:
Yii::$app->getDb()->createCommand("Your SQL")->xxx
For more related content, please pay attention to the Programming Introduction column on the php Chinese website!
The above is the detailed content of How to execute native sql statement query in yii2. For more information, please follow other related articles on the PHP Chinese website!