Home > PHP > Function > > db2_fetch_object()

db2_fetch_object()

db2_fetch_object - Returns an object with properties representing columns in the fetched row

Syntax

object db2_fetch_object (resource $stmt, int $row_number)

Arguments

  • stmt - A valid stmtresource containing a result set.
  • row_number - Requests a specific 1-indexed row from the result set. Passing this parameter results in a PHP warning if the result set uses a forward-only cursor.

Description

Returns an object in which each property represents a column returned in the row fetched from a result set.

Version

PHP PECL ibm_db2 >= 1.0.0

Return value

Returns an object representing a single row in the result set. The properties of the object map to the names of the columns in the result set.