in reply to fetch all data
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: fetch all data
by bigup401 (Pilgrim) on Mar 17, 2019 at 15:54 UTC | |
by poj (Abbot) on Mar 17, 2019 at 16:22 UTC | |
by stevieb (Canon) on Mar 17, 2019 at 16:24 UTC | |
by bigup401 (Pilgrim) on Mar 17, 2019 at 18:04 UTC | |
by poj (Abbot) on Mar 17, 2019 at 18:23 UTC | |
by bigup401 (Pilgrim) on Mar 17, 2019 at 20:03 UTC | |
|