Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: DBI Fetchrow_hasref issue

by jweed (Chaplain)
on Feb 21, 2004 at 17:20 UTC ( #330825=note: print w/replies, xml ) Need Help??


in reply to DBI fetchrow_hashref issue

You're very close. To make your first example work, you need to just add a dollar sign in front of info when you dereference:
while($info = $sth->fetchrow_hashref) { @case = keys %{ $info }; print @case; }
Once you do this, you'll see that your second example is basically the same as the first, except it iterates thought the hash instead of dumping the keys all at once.

HTH.



Code is (almost) always untested.
http://www.justicepoetic.net/

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://330825]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2018-07-23 04:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (459 votes). Check out past polls.

    Notices?