in reply to Re: View 100 then click for rest
in thread View 100 then click for rest

Nice, but why return the full set, when you're only interested in some columns?
my $offset ||= 0; my $max = 100; my $sth = $dbh->prepare("SELECT ... LIMIT ?,?"); $sth->execute($offset, $limit);

Replies are listed 'Best First'.
RE: RE: Re: View 100 then click for rest
by lhoward (Vicar) on Jul 27, 2000 at 21:10 UTC
    Not all databases support "LIMIT" as part of the SQL language. I agree that if your DB does support LIMIT then you should use it, but if you want a truly DB independant solution (much as DBI is database independant) you should avoid LIMIT and other not-widely supported extensions.
      just out of curiosity... what database packages don't support limit?