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

Re: Re: Quoting problem in DBI:ODBC

by Seumas (Curate)
on Jun 27, 2003 at 15:49 UTC ( #269633=note: print w/replies, xml ) Need Help??


in reply to Re: Quoting problem in DBI:ODBC
in thread Quoting problem in DBI:ODBC

Another option is to use placeholders, which is even cleaner than using $dbh->quote(). It isn't the right fit for 100% of your queries and statements, but it is for 99% of them. Check the DBI:: docs for details on how to use it. It would be something like.
eval { my $sth = $dbh->prepare("INSERT INTO users (fname, lname, phone) VA +LUES(?, ?, ?)"); $sth->execute($fname, $lname, $phone); $dbh->commit();

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2023-12-11 21:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (41 votes). Check out past polls.

    Notices?