Created
July 11, 2017 19:43
-
-
Save marcelodeandrade/db041055c89f85868ac198e70b0b64ac to your computer and use it in GitHub Desktop.
Yii2 mode to get raw sql from ActiveRecord
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$query = Model::findAll(); | |
echo $query->createCommand()->sql; | |
echo $query->createCommand()->getRawSql(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment