Re: Re: Bug #1435 Updated: pg_fetch_row does not iterate.
| From: | Sascha Schumann | Date: | Fri, 28 May 1999 14:59:52 +0000 |
| Subject: | Re: Re: Bug #1435 Updated: pg_fetch_row does not iterate. | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-6160@lists.php.net to get a copy of this message | ||
On Fri, May 28, 1999 at 10:56:54AM -0400, Luis Anaya wrote:
>
> Hi:
>
> Ok... This is not an operational problem, this is a documentation error.
>
> >From www.php.net/manual/function.pg-fetch-row.php3:
>
>
> Returns: An array that corresponds to the fetched row,
> or false if there are no more rows.
> pg_fetch_row() fetches one row of data from the result
> associated with the specified result identifier. The row is returned as an
> array. Each result column is stored in an array offset, starting at offset
> 0.
>
> Subsequent call to pg_fetch_row() would return the next
> row in the result set, or false if there
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
> are no more rows.
> ~~~~~~~~~~~~~~
This is correct. See functions/pgsql.c, line 904. There a check is performed
on row->value.lval. It returns false, if row->value.lval is negative or
greater or equal to the number of tuples in that result set.
if (row->value.lval<0 || row->value.lval>=PQntuples(pgsql_result)) {
php3_error(E_WARNING,"Unable to jump to row %d on PostgresSQL result index
%d",row->value.lval,result->value.lval);
RETURN_FALSE;
}
--
Regards,
Sascha Schumann
Consultant
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net