On Sat, Jul 14, 2001 at 05:00:11PM -0700, Alex Algard wrote:
> > 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.

Pass a ref to an empty hash. See the docs, and the code.

Tim.

Reply via email to