I'm pretty sure you'll want to use something like fetchall_arrayref() (or one of the other "fetchall" methods):
my $records = $get_age->fetchall_arrayref; for my $record (@$records){ printf "%d\n", $record->[0]; # AGE field }
In other words, the fetchrow methods literally only grab a single row.
Update: modified code per poj's post here. I apologize for forgetting to say my code was untested.
In reply to Re: fetch all data
by stevieb
in thread fetch all data
by bigup401
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |