On 8/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
snip
> No, the version of DBI that I am using is very current so apparently
> the DBI book is current on that issue also.  Using your code above
> (same as book) worked fine.
snip

Ah, I knew there was a reason beyond readability that I preferred
fetchrow_hashref:

from perldoc DBI
       "fetchrow_arrayref"
             $ary_ref = $sth->fetchrow_arrayref;
             $ary_ref = $sth->fetch;    # alias
snip
           Note that the same array reference is returned for each fetch, so
           don't store the reference and then use it after a later fetch.
           Also, the elements of the array are also reused for each row, so
           take care if you want to take a reference to an element. See also
           "bind_columns".
snip
       "fetchrow_hashref"
            $hash_ref = $sth->fetchrow_hashref;
            $hash_ref = $sth->fetchrow_hashref($name);
snip
           By default a reference to a new hash is returned for each row.  It
           is likely that a future version of the DBI will support an
           attribute which will enable the same hash to be reused for each
           row. This will give a significant performance boost, but it won't
           be enabled by default because of the risk of breaking old code.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to