(Fwd) DBI support for arrayshash



----- Forwarded message from Dmitry Trofimov <dmitry@xxxxxxxxxxx> -----

From: Dmitry Trofimov <dmitry@xxxxxxxxxxx>
To: Tim.Bunce@xxxxxxxxx
Subject: DBI support for arrayshash

Hello.

Please include function selectall_arrayhash in next versions of DBI.
It should be useful for all people.

#################################################
# Get all hash records in array
#################################################
sub selectall_arrayhash{
my $self = shift;
my @res;

my $sth = $self->{dbh}->prepare(shift);
$sth->execute(@_);
while(my $data=$sth->fetchrow_hashref){
push @res, $data;
};
$sth->finish;

return \@res;
}

Regards Dmitry.

----- End forwarded message -----
.