(Fwd) DBI support for arrayshash
- From: Tim.Bunce@xxxxxxxxx (Tim Bunce)
- Date: Wed, 20 Jul 2005 23:36:24 +0100
----- 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 -----
.
- Prev by Date: Troubles using bind_param_array and execute_array with DBD::Ingres
- Next by Date: Re: Fwd: it works, but...
- Previous by thread: Troubles using bind_param_array and execute_array with DBD::Ingres
- Next by thread: What is up with DBI FAQ site ?
- Index(es):