On Thu, Sep 11, 2008 at 8:01 PM, Dr.Ruud
<[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> wrote:

> 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/
>
>
>
What about the scenario when the table is accessed in a read-only mode ?

Also I want to know whether the subsequent calls to fetchrow_array will
actually fetch the next LIMIT records or the current LIMIT one.

Regards,
Amit Saxena

Reply via email to