Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

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?

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-06-23 19:56 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.