> It was a mistake. I've deleted it now. Use...
> $ary_ref = $sth->fetchall_arrayref( {} );
That's actually what I'm doing now. My concern is that using
fetchall_arrayref() by passing an anonymous hash as an argument is
susceptible to typos when the columns are being initialized, and the code
also requires more maintenance, for example, if a table column is added or
renamed. In addition, using this approach on a table with many columns would
result in a lot of code. So please consider adding fetchall_hashref() to
DBI.
Thanks,
Alex Algard
> -----Original Message-----
> From: Tim Bunce [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 14, 2001 12:32 PM
> To: Alex Algard
> Cc: dbi-users; Tim.Bunce
> Subject: Re: fetchall_hashref() - does/will it exist?
>
>
> On Fri, Jul 13, 2001 at 04:20:59PM -0700, Alex Algard wrote:
> > I just downloaded DBI 1.18, and although the "fetchall_hashref"
> method is
> > mentioned in the documentation, it doesn't appear to exist in
> the code. Is
> > this is an oversight? In any case, will this method be included
> in the next
> > version of DBI, and if so, is that expected to be soon?
>
> It was a mistake. I've deleted it now. Use...
>
> $ary_ref = $sth->fetchall_arrayref( {} );
>
> instead.
>
> Tim.