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

Re: Inserting into SQL

by snowcrash (Friar)
on Feb 13, 2002 at 11:14 UTC ( #145132=note: print w/ replies, xml ) Need Help??


in reply to Inserting into SQL

sounds like a quoting problem to me. when dealing with text or binary data always quote the value like:

my $sql = "INSERT INTO feedback SET fulltext=" . $dbh->quote($feedback);

hth,
snowcrash


Comment on Re: Inserting into SQL
Download Code
Re: Re: Inserting into SQL
by Masem (Monsignor) on Feb 13, 2002 at 12:51 UTC
    The poster is already using placeholders, which is guarenteed to quote the inputs (either by the DB itself or by DBI if the DB doesn't support it). And placeholders are always more desirable to use than to place the inputs into the SQL statement itself, even if you quote them.

    -----------------------------------------------------
    Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
    "I can see my house from here!"
    It's not what you know, but knowing how to find it if you don't know that's important

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2014-08-23 20:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (178 votes), past polls