in reply to fetchrow_array return value
Why not do something like:
As for using $sth->rows(), the problem is that for most database engines the number of rows affected by a SELECT query can only be determined once all of the rows have been fetched...my $found = 0; while(my @row = $sth->fetchrow_array) { ++$found; ... process @row ... } if(!$found) { ... no rows found ... }
Michael
|
|---|