Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Quoting problem in DBI:ODBC

by Grygonos (Chaplain)
on Jun 27, 2003 at 15:19 UTC ( #269615=note: print w/replies, xml ) Need Help??

in reply to Quoting problem in DBI:ODBC

please disregard this... I had always quoted my own literals... never realized that i should just
and so on.. sorry.

Replies are listed 'Best First'.
Re: Re: Quoting problem in DBI:ODBC
by Seumas (Curate) on Jun 27, 2003 at 15:49 UTC
    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?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2020-01-28 00:54 GMT
Find Nodes?
    Voting Booth?