Today just a simple command. If you need to know the current query for an Activerecord object, you need this simple command:
$query->createCommand()->getRawSql();
This will show current SQL query. Another solution is:
$query->createCommand()->sql;
Today just a simple command. If you need to know the current query for an Activerecord object, you need this simple command:
$query->createCommand()->getRawSql();
This will show current SQL query. Another solution is:
$query->createCommand()->sql;