Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Clear questions and runnable code
get the best and fastest answer
 
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 cooling their heels in the Monastery: (12)
As of 2014-04-17 17:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (453 votes), past polls