yii2查看SQL命令

 查看sql:

$data->createCommand()->getRawSql()

 结果

原文地址:https://www.cnblogs.com/lucky2017/p/13594490.html