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
Post a Comment