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
In reply to Re: fetchrow_array return value
by mpeppler
in thread fetchrow_array return value
by Notromda
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |