for tracing of sql in my yii-1.1.14 app I wrote in config file :
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
array(
'class'=>'CFileLogRoute',
'levels'=>'trace',
'categories'=>'system.db.*',
'logFile'=>'sql.log',
),
),
),
But in in my sql.log file I see rows:
2014/02/19 11:39:14 [trace] [system.db.ar.CActiveRecord] Tour.findAll()
2014/02/19 11:39:14 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `tbl_tour` `t` WHERE (feature=:ycp2) AND (status=:ycp3) LIMIT 10
What I need that is to see real values but not parameters like : ycp3
If there is any way to do this ?
you must enable enableParamLogging in db connection:
a very good tutorial is here:
http://www.larryullman.com/2013/09/23/debugging-database-operations-in-yii/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.