my @results;
while (my @row = $sth->fetchrow_array) {
push @results,\@row;
}
if (@results) {
...we got something...
} else {
...we got nothing...
}
might help, though I woundn't use it in the case where a large result set is expected/possible. If large results sets
are expected/possible then a flag might help:
my $results = 0;
while (my @row = $sth->fetchrow_array) {
$results++;
...do some stuff
}
if ($results) {
...we got something...
} else {
...we got nothing...
}
rdfield |