Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: DBI fetchrow_hashref issue

by cchampion (Curate)
on Feb 21, 2004 at 18:40 UTC ( #330844=note: print w/ replies, xml ) Need Help??


in reply to DBI fetchrow_hashref issue

Aside from the specific problem in your code, what you want to achieve an also be done with:

my @case = @{$sth->{NAME}}; while(my $info = $sth->fetchrow_hashref) { for (@case) { print "$_ => $info->{$_}\n"; } }

I recommend reading DBI Recipes, which deals with several issues related to fetching hashrefs from a database.

BTW, the probable reason for your mistake is that you are not using strict.


Comment on Re: DBI fetchrow_hashref issue
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2014-12-17 22:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (35 votes), past polls