in reply to Re: Re: If no results come back ...
in thread If no results come back ...

so what is the problem? ( why don't you just put it in a while or for loop or do you need further instruction?)
  • Comment on Re: Re: Re: If no results come back ...

Replies are listed 'Best First'.
Re: Re: Re: Re: If no results come back ...
by andrew (Acolyte) on Jul 21, 2002 at 04:18 UTC
    further
      Something like:
      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