Seing parameter values bound to a failed query in stack traces

Hi,

Whenever a query fails (e.g. due to a constraint violation) and an exception is trown, the stack trace that is logged contains the full SQL query, which is great, but it only shows the prepared statement with parameter names such as :yp0, :yp1 and doesn’t show the bound values, which renders it practically useless in most cases.

Is there some configuration that I can easily change so that parameter values are included in such traces?

thanks

m.

Yes, you need to set the CDbConnection->enableParamLogging - http://www.yiiframework.com/doc/api/1.1/CDbConnection#enableParamLogging-detail