Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Clean a database record off an apostrophe '

by aufrank (Pilgrim)
on Jul 30, 2002 at 15:52 UTC ( #186242=note: print w/replies, xml ) Need Help??


in reply to Clean a database record off an apostrophe '

dbi provides useful quoting methods, which are designed to prepare your data for use in an sql statement, but could just as easily make it pretty enough for javascript. consider:

map {$dbh->quote($_) } ($custno, $companyName, $address, $city, $state +, $zip);

or, for double quotes around most values, try $dbh->quote_identifier($_) in the map instead.

hth,
--au

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2022-12-01 17:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?