jm schreef:

> there is a LIMIT option for the SELECT statement that will return the
> number of records you desire.
>
> $sth = $dbh->prepare("select <whatever> from <table> <optional WHERE
> arguments> LIMIT <desired number of records>");
> $sth->execute();
>
> while ($vars ...) = $sth->fetchrow_array())
> {
> }
> # or whatever syntax best suits your preferences

That won't always work as you expect it. You need to give values for the
ORDER BY and OFFSET and LIMIT, but between queries there can be new rows
inserted or deleted, so you might get the same row again, or miss new
ones.

-- 
Affijn, Ruud

"Gewoon is een tijger."


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to