Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: PERL DBI MODULE

by Tux (Monsignor)
on May 19, 2014 at 13:44 UTC ( #1086664=note: print w/ replies, xml ) Need Help??


in reply to PERL DBI MODULE

As said by others, your quest is kinda dubious.

My first warning/quest after reading the OP is: "Do you really mean to match coln1 against a literal '?'?

If you want to match against a parameter in the execute that will not DWIM at all.

my %sth = map { $_ => $dbh->prepare ("select * from foo where $_ = ?") + } qw( coln1 coln2 coln3 ); # Note the unquoted ? $sth{coln1}->execute ($coln1_val); # query for coln1 executed with ? r +eplaced with $coln2_val

Enjoy, Have FUN! H.Merijn


Comment on Re: PERL DBI MODULE
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2014-09-22 06:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (182 votes), past polls