2008年12月23日星期二

[fw-db] $db->isInTransaction ?

Hi there,

I have a little question...

In a MVC projet, I have an error controller wich catch unhandled
exceptions and log them into DB. In some case, an exception is throwed
in a transaction, and, for my DB Logger to work, I need to rollback in
my Error controller. Is there any easy solution to know if you are in a
DB transaction with a PDO_MYSQL adapter ?

Actually, I manually use Zend_Registry to modify the 'isInTransaction'
entry states... I think it's not a really good way.

Thanks for your help,
Lucas

没有评论: