Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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
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 studying the Monastery: (14)
As of 2014-12-18 12:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (51 votes), past polls