Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Getting Record Set via DBI into an Array of Arrays

by bradcathey (Prior)
on Apr 13, 2009 at 13:50 UTC ( #757210=note: print w/ replies, xml ) Need Help??


in reply to Getting Record Set via DBI into an Array of Arrays

Required reading

You will learn some amazing shortcuts:

my $data = $dbh->selectall_arrayref($stmt, {Slice => {}});
—Brad
"The important work of moving the world forward does not wait to be done by perfect men." George Eliot


Comment on Re: Getting Record Set via DBI into an Array of Arrays
Download Code
Replies are listed 'Best First'.
Re^2: Getting Record Set via DBI into an Array of Arrays
by ikegami (Pope) on Apr 13, 2009 at 14:09 UTC

    Nice link and I hadn't see Slice => before, but your code doesn't do what the OP wants. It creates a hash per row. The OP wants an array per column.

    Everyone's making two errors.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://757210]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (13)
As of 2015-07-31 10:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (276 votes), past polls