Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: No apostrophe Insert into MySQL

by Codon (Friar)
on Oct 31, 2005 at 21:16 UTC ( #504422=note: print w/ replies, xml ) Need Help??


in reply to Re: No apostrophe Insert into MySQL
in thread No apostrophe Insert into MySQL

DBI also supplies a quote() method which will quote a string appropriately for your DB. This may save you from massive code refactoring.

my $quoted = $dbh->quote("Wouldn't you rather use bind parameters?");
TMTOWTDI, although some are certainly better than others.

Ivan Heffner
Sr. Software Engineer, DAS Lead
WhitePages.com, Inc.


Comment on Re^2: No apostrophe Insert into MySQL
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (21)
As of 2015-07-31 17:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (279 votes), past polls