Webmaster's Community

Designing and Development => Open Source => Yii PHP Framework Support => Topic started by: perks on October 09, 2012, 12:24:01 PM

Title: How to echo query in yii framework
Post by: perks on October 09, 2012, 12:24:01 PM
Hi ,
          i want to see my query as a string so that i can change my query to move further with wrong statements
           so that i can save my time  or system time as well...!!!!
Title: Re: How to echo query in yii framework
Post by: phpdeveloper on October 11, 2012, 10:14:57 AM
hey you can use getText() to see your query or you can also change this to see AR query or your queries like this
Code: [Select]
'db'=>array(
...
'enableParamLogging' => true,
'enableProfiling' =>true,
),

),
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
array(
'class'=>'CProfileLogRoute',
'report' => 'summary',
),