in reply to Debugging DBI placeholders

The sugested $dbh->trace (...) is of course the documented way of tracing what actually happens with your code on the way to and from the database.

You didn't tell what database you are using, but some (DBD::Oracle, DBD::Pg, and DBD::Unify that I know of) have implemented the dbd_verbose attribute, in which you can track what the DBD backend is doing with your data. Read the documentation of your DBD for how it - if at all - implements dbd_verbose. The huge advantage of dbd_verbose over $dbh->trace is that you do not get to see the DBI messages, which I already trust enough not to be part of my doubts.


Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^2: Debugging DBI placeholders
by davies (Monsignor) on Feb 04, 2011 at 14:06 UTC

    Thanks. I'll play around with that. I'm not specifying DBD explicitly; I'm trying to write code that should work for any database back end. I'm actually using MySQL myself, and marto's help highlighted that my code is connecting to localhost instead of the specified server, which is understandably causing problems!

    Regards,

    John