in reply to sorting return from
I believe you're looking for the fetchall_arrayref method. You can use it like this:
my $rows = $sth->fetchall_arrayref; print "$_->{'name'} $_->{'age'}, $_->{'height'}" for (@$rows);
If the number of returned rows is huge however, you may want to fetch them one at a time, using fetchrow_hashref:
while (my $row = $sth->fetchrow_hashref) { print "$row->{'name'} $row->{'age'}, $row->{'height'}; }
Update: confused fetchall_hashref with fetchall_arrayref...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: sorting return from
by Baz (Friar) on Sep 02, 2005 at 23:19 UTC |