这里有一个快速的提示转储查询的SQL。

$query = new Books::find()->where('author=2');
echo $query->createCommand()->sql;

或者获取包含所有参数的SQL请尝试:

$query->createCommand()->getRawSql()
点赞 ({{click_count}}) 收藏 (0)