Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Pretty printing the exact query (with bind variables) executed by DBI?

by erix (Prior)
on Dec 18, 2007 at 02:45 UTC ( [id://657590]=note: print w/replies, xml ) Need Help??


in reply to Pretty printing the exact query (with bind variables) executed by DBI?

I find it handy (as a debug facility) to add the actual values out-commented behind the placeholders. This doesn't give you the exact statement but it makes it easy to reproduce them, or just to check the actual values that the statement was executed with:

select name, address, phone where name = ? -- 'Doe'

Another approach would be to let DBI trace produce its mess, and make your statements easy to parse out of the 'wealth of information' by a markup scheme, again SQL-outcommented, of course:

-----8<--------------- select name, address, phone where name = ? -----8<---------------

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://657590]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-25 05:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found