in reply to Perl/MySQL
You'll find it easier to user fetchrow_hashref for this purpose, like this:
Edit: I made a stupid mistake: it should bewhile ($row=$sth->fetchrow_hashref) { foreach $col (%{$row}) { print "$col: ".$$row{$col}."\n"; } }
foreach $col (keys %{$row}) {
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Perl/MySQL
by Anonymous Monk on Feb 15, 2005 at 14:12 UTC |
In Section
Seekers of Perl Wisdom