I have used Codeigniter before and it has a feature that will echo the last database query - really useful for debugging.
eg...
$this->getSomeData->findAll();
Yii command to output this single query e.g SELECT * FROM TABLE...
Does Yii have a similar feature to simply show the very last query executed?
Try this in your config file. You can see the query and other details at the bottom of the page.
'db'=>array(
'enableProfiling'=>true,
'enableParamLogging' => true,
),
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
…
array(
'class'=>'CProfileLogRoute',
'levels'=>'profile',
'enabled'=>true,
),
),
),
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With