Have you looked at the Zend_Db profiler? We use it to log queries to
FirePHP.



T

On Thu, Dec 4, 2008 at 02:25, Daniel Latter <[EMAIL PROTECTED]> wrote:

> Hi,
>
> Just an idea but you could have a base class (maybe extend
> Zend_Db_Table) and put some custom code in here that does the logging,
> that way you would only have to add the logging code in one place.
>
> just my 2p
>
> Thank You
> Daniel Latter
>
>
>
> 2008/12/2 Ralikwen <[EMAIL PROTECTED]>:
>  >
> > Hi,
> > is there a generic way to log all database calls from ZF? Or log all db
> > errors?
> >
> > I know that I can use the profiler - I use it with Firebug and it works
> > nicely with successful queries - but gives me no help when a db error
> > occurs.
> > When a db error occurs I would like to see the offending statement
> without
> > having to write spec code to every db call. Even the stack trace could
> help
> > if only it displayed the whole sql statement instead of just the
> beginning
> > of it. I searched quite a lot now but couldn't find an example of a
> generic
> > way to log sql statement or even sql errors.
> >
> > How would you do this?
> >
> > Thanks for the help.
> > SWK
> > --
> > View this message in context:
> http://www.nabble.com/logging-offending-queries-tp20800359p20800359.html
> > Sent from the Zend Framework mailing list archive at Nabble.com.
> >
> >
>

Reply via email to