Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 having an uproarious good time at the Monastery: (14)
As of 2016-02-12 14:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (402 votes), past polls