How to print converted SQL query from yii2 query -


i want print query:

$demo = demo::find()->all(); 

i want see converted sql query parameters:

createcommand()->getrawsql(); 

is showing me error message:

yii2 call member function createcommand() on non-object

please me see actual sql query.

eg:

$query = demo::find()->where(['category'=>2]); echo $query->createcommand()->getrawsql(); 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -