Hi all,
I’m using Active Records and I just would like to know, if there is a mean to know the last generated query.
Just for "debuging" when creating "complex" query.
Thanks
Hi all,
I’m using Active Records and I just would like to know, if there is a mean to know the last generated query.
Just for "debuging" when creating "complex" query.
Thanks
You can configure logger to show it at the bottom of the page (or write it to log file / db):
'db'=>array(
'enableProfiling'=>true,
'enableParamLogging' => true,
),
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
…
array(
'class'=>'CProfileLogRoute',
'levels'=>'profile',
'enabled'=>true,
),
),
),
Thanks that was exactly I’m looking for…
What if i need to display only one last query?