Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Re: Dereferencing nested references

by ryddler (Monk)
on Jan 16, 2001 at 21:44 UTC ( [id://52392]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: Dereferencing nested references
in thread Dereferencing nested references

I was able to use part of your code, as well as some of the above info I learned to get back the data I need. My thanks to all of you.

Now this bit below that you posted above is bothering me because I haven't been able to find any references to this attribute you set. Where did you find out how to do this litte miracle?

#force selectall_arrayref to return an arrayref of hashrefs my %attr = ( dbi_fetchall_arrayref_attr => {}, );


ryddler

Replies are listed 'Best First'.
Re: Re: Re: Dereferencing nested references
by btrott (Parson) on Jan 16, 2001 at 22:08 UTC
    You really just need to look at the source for DBI, version 1.14 (I think that's when this feature was added). It's not documented, as the Todo points out:
    document dbi_fetchall_arrayref_attr attr of selectall_arrayref().
    Anyway, the way this works is that this attribute controls the behavior of selectall_arrayref. If you don't set it, it defaults to an arrayref, which tells the method to fetch the rows as array refs and return an arrayref of those arrayrefs.

    If, however, you set it to a hash ref, that tells selectall_arrayref to fetch the rows as hash refs, and return an array ref of hash refs. Make sense?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://52392]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.