Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

(dkubb) Re: (2) dbi & placeholders: getting the actual sql

by Anonymous Monk
on Sep 12, 2001 at 06:12 UTC ( [id://111838]=note: print w/replies, xml ) Need Help??


in reply to dbi & placeholders: getting the actual sql

Here is what I do sometimes during debugging to see what values will be put into the placeholders by DBI for me:

my $statement = $sql; $statement =~ s/\?/$dbh->quote($_)/e for @bindvals; print "The SQL query will be: [$statement]";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-16 17:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found