PECL ibm_db2 >= 1.0.0
db2_fetch_row - Sets the result set pointer to the next row or requested row
Code Examples

db2_fetch_row( resource$stmt, [int$row_number] ): bool

Use db2_fetch_row to iterate through a result set, or to point to a specific row in a result set if you requested a scrollable cursor.

To retrieve individual fields from the result set, call the db2_result function.

Rather than calling db2_fetch_row and db2_result, most applications will call one of db2_fetch_assoc, db2_fetch_both, or db2_fetch_array to advance the result set pointer and return a complete row as an array.



A valid stmt resource.


With scrollable cursors, you can request a specific row number in the result set. Row numbering is 1-indexed.

Return Values

Returns true if the requested row exists in the result set. Returns false if the requested row does not exist in the result set.

Related Functions

Example of db2_fetch_row

Show all examples for db2_fetch_row

PHP Version: