On the production page of my Yii 1.1 project I set up the error handling to get a mail message if an error occurs.
I want to add the SQL to the message content, if the error is a database related error.
How can I assign the SQL statement, that caused the error, to a PHP variable?
Tnank you for hints.