Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: DBI and fetchall_arrayref

by bradcathey (Prior)
on Feb 20, 2009 at 14:28 UTC ( [id://745363]=note: print w/replies, xml ) Need Help??


in reply to DBI and fetchall_arrayref

BTW and slight OT, I gave up on "fetching" a couple of years ago after I read gmax's wonderful DBI Recipes. No prepping or executing needed.

my $stmt = qq/SELECT * FROM mytable WHERE id = ?/; my $result = $dbh->selectall_arrayref($stmt, {Slice => {}}, $subscribe +r_id);

You end up with an AoH, which is perfect for me as I'm usually populating a loop in HTML::Template

—Brad
"The important work of moving the world forward does not wait to be done by perfect men." George Eliot

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-03-28 11:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found