Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: escape characters for dbi

by twerq (Deacon)
on Jun 10, 2002 at 21:09 UTC ( [id://173301]=note: print w/replies, xml ) Need Help??


in reply to escape characters for dbi

You could try:
my $name = $dbh->quote("O'Brien"); $sth = $dbh->prepare("SELECT SUM(number) FROM $serverTable where name = $name);

--twerq UPDATED -- merlyn: why does that work? Does using placeholder auto-quote for you?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-06-17 20:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.