Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Inserting large chunks of data into MySQL

by pc88mxer (Vicar)
on May 04, 2008 at 15:18 UTC ( [id://684438]=note: print w/replies, xml ) Need Help??


in reply to Inserting large chunks of data into MySQL

First of all, are you sure this code works? perltidy reports that it parses this way:
... $count = $dbh->do("INSERT INTO ques (...) VALUES (...)", undef, $usernamenow, $txtque, ... ); ...
I think you want single quotes for the SQL statement and placeholders (?) like this:
$count = $dbh->do('INSERT INTO ques (...) VALUES (?,?,?,?,...)', undef, $usernamenow, $txtque, ... );
You use of double quotes and string interpolation (i.e. using $usernamenow inside the double-quoted string) will definitely cause you problems.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2025-06-17 06:42 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.