Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: looping hash

by TJPride (Pilgrim)
on Mar 02, 2012 at 18:08 UTC ( [id://957525]=note: print w/replies, xml ) Need Help??


in reply to looping hash

Untested, but it should be a place to start:

@keys = @{$sth2->{NAME}}; print join "\t", @keys; print "\r"; while ($record = $sth->fetchrow_hashref()) { print join "\t", map { $record->{$_} } @keys; print "\r"; }

Replies are listed 'Best First'.
Re^2: looping hash
by ibra (Novice) on Mar 07, 2012 at 16:33 UTC
    Thanks for the reply I Manage to figure it out below.
    my $Val=""; while ( my $dat_ref = $sth2->fetchrow_hashref("NAME_lc") ) { foreach my $val(@eachCols) { $Val = $dat_ref->{$val}; } }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2026-04-12 16:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.