Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (13)
As of 2018-11-14 13:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My code is most likely broken because:
















    Results (172 votes). Check out past polls.

    Notices?