db2_execute

PECL ibm_db2 >= 1.0.0
db2_execute - Executes a prepared SQL statement
Manual
Code Examples

db2_execute( resource$stmt, [array$parameters] ): bool

db2_execute executes an SQL statement that was prepared by db2_prepare.

If the SQL statement returns a result set, for example, a SELECT statement or a CALL to a stored procedure that returns one or more result sets, you can retrieve a row as an array from the stmt resource using db2_fetch_assoc, db2_fetch_both, or db2_fetch_array. Alternatively, you can use db2_fetch_row to move the result set pointer to the next row and fetch a column at a time from that row with db2_result.

Refer to db2_prepare for a brief discussion of the advantages of using db2_prepare and db2_execute rather than db2_exec.

Parameters

stmt

A prepared statement returned from db2_prepare.

parameters

An array of input parameters matching any parameter markers contained in the prepared statement.

Return Values

Returns true on success or false on failure.

Related Functions

Example of db2_execute

Show all examples for db2_execute

PHP Version: