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

Single column Query into Multiple Arrays

by cocl04 (Sexton)
on Nov 13, 2008 at 22:06 UTC ( #723517=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    All,
    I have a simple sql process in Perl that returns distinct id's.  If I 
    +load the id's into an array via a $row = $query->fetchrow_array, it d
    +umps ALL of the values from the one column into arry index  '0' / $ro
    +w[0].  Is there a way to read in / fetch a distinct column of values 
    +from a query and place each element / item in a different array index
    +....$row[0],$row[1],.....$row[n]!  The data is currently in $alignmen
    +t.  I can load the data into an array and it is fine. 
    ...
    $row[0] = 'A01', $row[1] = 'B22', $row[2] = 'C99'...$row[n] 
    
    Finally, I am doing this to pass those id's to my Perl adn Sql code.  
    +This process will keep me from setting up several perl processes for 
    +the same thing.  Please help....
    
  2. or download this
    ##################################
    #
    ...
    ############################
    
    $query->execute() or die $connection->errstr;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2021-03-05 10:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (109 votes). Check out past polls.

    Notices?