db2_num_rows

(PECL ibm_db2 >= 1.0.0) Returns the number of rows affected by an SQL statement int db2_num_rows ( resource $stmt ) Returns the number of rows deleted, inserted, or updated by an SQL statement. To determine the number of rows that will be returned by a SELECT statement, issue SELECT COUNT(*) with the same predicates as your intended SELECT statement and retrieve the value. If your application logic checks the number

db2_num_fields

(PECL ibm_db2 >= 1.0.0) Returns the number of fields contained in a result set int db2_num_fields ( resource $stmt ) Returns the number of fields contained in a result set. This is most useful for handling the result sets returned by dynamically generated queries, or for result sets returned by stored procedures, where your application cannot otherwise know how to retrieve and use the results. Parameter

db2_next_result

(PECL ibm_db2 >= 1.0.0) Requests the next result set from a stored procedure resource db2_next_result ( resource $stmt ) A stored procedure can return zero or more result sets. While you handle the first result set in exactly the same way you would handle the results returned by a simple SELECT statement, to fetch the second and subsequent result sets from a stored procedure you must call the db2_next_result() function

db2_lob_read

(PECL ibm_db2 >= 1.6.0) Gets a user defined size of LOB files with each invocation string db2_lob_read ( resource $stmt, int $colnum, int $length ) Use db2_lob_read() to iterate through a specified column of a result set and retrieve a user defined size of LOB data. Parameters: stmt A valid stmt resource containing LOB data. colnum

db2_last_insert_id

(PECL ibm_db2 >= 1.7.1) Returns the auto generated ID of the last insert query that successfully executed on this connection string db2_last_insert_id ( resource $resource ) Returns the auto generated ID of the last insert query that successfully executed on this connection. The result of this function is not affected by any of the following: A single row INSERT statement with a VALUES clause for a table without an i

db2_get_option

(PECL ibm_db2 >= 1.6.0) Retrieves an option value for a statement resource or a connection resource string db2_get_option ( resource $resource, string $option ) Retrieves the value of a specified option value for a statement resource or a connection resource. Parameters: resource A valid statement resource as returned from db2_prepare() or a valid connection resource a

db2_free_stmt

(PECL ibm_db2 >= 1.0.0) Frees resources associated with the indicated statement resource bool db2_free_stmt ( resource $stmt ) Frees the system and database resources that are associated with a statement resource. These resources are freed implicitly when a script finishes, but you can call db2_free_stmt() to explicitly free the statement resources before the end of the script. Parameters:

db2_free_result

(PECL ibm_db2 >= 1.0.0) Frees resources associated with a result set bool db2_free_result ( resource $stmt ) Frees the system and database resources that are associated with a result set. These resources are freed implicitly when a script finishes, but you can call db2_free_result() to explicitly free the result set resources before the end of the script. Parameters: stmt

db2_foreign_keys

(PECL ibm_db2 >= 1.0.0) Returns a result set listing the foreign keys for a table resource db2_foreign_keys ( resource $connection, string $qualifier, string $schema, string $table-name ) Returns a result set listing the foreign keys for a table. Parameters: connection A valid connection to an IBM DB2, Cloudscape, or Apache Derby database. qual

db2_field_width

(PECL ibm_db2 >= 1.0.0) Returns the width of the current value of the indicated column in a result set int db2_field_width ( resource $stmt, mixed $column ) Returns the width of the current value of the indicated column in a result set. This is the maximum width of the column for a fixed-length data type, or the actual width of the column for a variable-length data type. Parameters: