in reply to (boo) Re:x3 Multi-Dimensional Array to Hash Conversion Optimization
in thread Multi-Dimensional Array to Hash Conversion Optimization

You're quick on the upgrades, apparently. Nicely.

The only downside is that selectall_hashref returns a ref to an array of hashes, not a hash of hashes based on a particular key field. Close, but not quite! Still, it has applications.

Thanks for the tip!

Replies are listed 'Best First'.
(boo) Re:x5 Multi-Dimensional Array to Hash Conversion Optimization
by boo_radley (Parson) on Apr 03, 2001 at 21:11 UTC
    really? I wish I had time to play with it right now...
    If I understand you correctly, you can the same functionality, that is, an array of hashes, from
    my $result_ref = $l_sth->fetchall_arrayref({})
    You can then do things like $$result_ref[0]{field} the above two lines are from code running on production machine; I know it works because my pager is too quiet for it to be otherwise.
    But for 1.15's fetchall_hashref, I haven't looked yet. Must play later.