Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: For a better efficiency and speed question!

by Lotus1 (Curate)
on Oct 04, 2011 at 15:35 UTC ( #929576=note: print w/replies, xml ) Need Help??


in reply to For a better efficiency and speed question!

I am suspecting that the line my $control_num = join ( ',', ('?') x @control ); where I am joining all the control numbers from the array "@control" is slowing down the query results.

Why worry about speed when you code doesn't work?

use strict; use warnings; my @control = qw ( 1 2 3 4 5 6 7 ); my $control_num = join ( ',', ('?') x @control ); print "cn=$control_num<<\n"; __DATA__ cn=?,?,?,?,?,?,?<<

Replies are listed 'Best First'.
Re^2: For a better efficiency and speed question!
by Anonymous Monk on Oct 04, 2011 at 15:42 UTC
    I am sorry but it does work, the reason why you see "?" when you run your little test code is because the question marks are "place holders" in the SQL query.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://929576]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2017-09-21 02:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (241 votes). Check out past polls.

    Notices?