>If I use something like:
>my $data= $sth->fetchall_arrayref;
> foreach (@$data){  
> print qq(@$_<BR>);
> }
> 
> 
>I get all the data, but how the hell do I access the specific 
>elements in
>this array of arrays?  Is there a better fetch method to use?  

my $data = $sth->fetchall_arrayref;

# Print Each element of each row per line separated by a space.
foreach my $row (@{$data}) {
    foreach $element (@{$row}) {
        print "$element ";
    }
    print "\n";
}

or

print "$data->[2][3]\n";    # print the 4th element of the third row.

or whatever slicing needs you want.

Have a look at perldoc perldsc for the data structure cookbook examples
which may lead you to look at other dbi methods to get the data structure
and processing you want.

--Neil


> 
>Thanks,
>Eric
> 
> 
>

__________________________________________________________________________
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.
If you are not the intended recipient, please delete this e-mail and notify
the sender immediately. The contents of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies
unless expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.


Reply via email to