Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: prepare insert statement outside while loop for speed

by McDarren (Abbot)
on Dec 02, 2010 at 05:19 UTC ( #874824=note: print w/ replies, xml ) Need Help??


in reply to prepare insert statement outside while loop for speed

$sth->execute($data[0],$data[1],$data[2], $data[3], $data[4],$data[5])
The above could be written a bit more succinctly as:
$sth->execute(@data[0 .. 5])
See Slices

Or, if you know that @data will always contain just six elements, then just simply:

$sth->execute(@data)
Hope this helps,
Darren


Comment on Re: prepare insert statement outside while loop for speed
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2014-08-22 21:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (167 votes), past polls