Re: Fwd: [PHP-NOTES] note 11968 added to class.pear.php
| From: | Tomas V.V.Cox | Date: | Fri, 16 Mar 2001 00:12:42 +0000 |
| Subject: | Re: Fwd: [PHP-NOTES] note 11968 added to class.pear.php | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-24@lists.php.net to get a copy of this message | ||
"Jesus M. Castagnetto" wrote:
>
> (Oops forgot that today is the lists' split day)
>
> Some code someone posted to the PEAR section of the
> manual, and may be of interest.
>
> I am adding a comment to that note indicating that
> code should be contributed to the PEAR list instead.
>
> --- nospamm@pear.net wrote:
> > Date: 15 Mar 2001 18:23:48 -0000
> > To: php-notes@lists.php.net
> > From: nospamm@pear.net
> > Subject: [PHP-NOTES] note 11968 added to
> > class.pear.php
> >
> > Hi all!
> >
> > We've coded a new functionallity for the fetchrow()
> > (PEAR). This functionality is work as a datasek.
> > Now, you can acess to a specific row of query's
> > result. This is usefull for NEXT/PREV buttons and
> > more.
> > The codification now is only for MySQL. Could any
> > people code the other databases?
> >
> > The $row parameter is the value where you want to
> > seek the internal pointer of the fetchrow result.
> > Default value is 0.
I have functional version of an Informix Pear DB class (perhaps in one
or two days I will post it here), and I found very good for it, the same
tip that this note says. In Informix the ifx_fetch_row() can accept a
second parameter telling the row you want in the result this is "NEXT",
"LAST", and also the abosolute position. This is very important for
spliting results.
Out of this, the Informix implementation of num_rows returns the current
fetched row, instead of the absolute number of rows that a query
returns. Should I return NOT_CAPABLE in the num_rows method?
Tomas V.V.Cox