Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2021-01-25 19:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?