in reply to Re: How can I display an entire MySQL table in Perl?
in thread How can I display an entire MySQL table in Perl?
use hashes and arrays with an array of hash refs
my @rows= (); # an array reference while (my $row= $sth->fetchrow_hashref) { push (@rows, $row); } #you can then pass the array of hash refs straight to an #HTML template loop construct or iterate over the array as #below foreach my $str (@$rows) { print $str->{'id'}; }
|
|---|