Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 dust plays in a shaft of sunlight...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2017-03-25 13:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (311 votes). Check out past polls.