in reply to Getting a count of all rows in MySQL
There are other useful methods for fetching the results of queries, all nicely documented in the manual.while ( my @row = $sth->fetchrow_array ) { print "@row\n" } # or while ( my $row_ref = $sth->fetchrow_arrayref ) { print "@$row\n" } # or my $allrows_ref = $sth->fetchall_arrayref; for my $row ( @$allrows_ref ) { print "@$row\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Getting a count of all rows in MySQL
by spmlingam (Scribe) on Dec 01, 2008 at 07:52 UTC |