Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Inserting large chunks of data into MySQL

by moritz (Cardinal)
on May 04, 2008 at 15:22 UTC ( [id://684440]=note: print w/replies, xml ) Need Help??


in reply to Inserting large chunks of data into MySQL

You'll get an error if one of these variables contains a single quote '.

To avoid that (and to boost performance) use placeholders instead:

my $sth = $dbh->prepare("INSERT INTO ques(username, userque, ...) VALU +ES (?, ?, ...)"); foreach my $t (split '~', $txtque){ $sth->execute($usernamenow, $t, ...); }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2025-06-18 09:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.