IBM DB2, Cloudscape and Apache Derby
Introduction
These functions enable you to access IBM DB2 Universal Database, IBM
Cloudscape, and Apache Derby databases using the DB2 Call Level Interface
(DB2 CLI).
Installing/Configuring Predefined Constants IBM DB2 Functions db2_autocommit — Returns or sets the AUTOCOMMIT state for a database connectiondb2_bind_param — Binds a PHP variable to an SQL statement parameterdb2_client_info — Returns an object with properties that describe the DB2 database clientdb2_close — Closes a database connectiondb2_column_privileges — Returns a result set listing the columns and associated privileges for a tabledb2_columns — Returns a result set listing the columns and associated metadata for a tabledb2_commit — Commits a transactiondb2_conn_error — Returns a string containing the SQLSTATE returned by the last connection attemptdb2_conn_errormsg — Returns the last connection error message and SQLCODE valuedb2_connect — Returns a connection to a databasedb2_cursor_type — Returns the cursor type used by a statement resourcedb2_escape_string — Used to escape certain charactersdb2_exec — Executes an SQL statement directlydb2_execute — Executes a prepared SQL statementdb2_fetch_array — Returns an array, indexed by column position, representing a row in a result setdb2_fetch_assoc — Returns an array, indexed by column name, representing a row in a result setdb2_fetch_both — Returns an array, indexed by both column name and position, representing a row in a result setdb2_fetch_object — Returns an object with properties representing columns in the fetched rowdb2_fetch_row — Sets the result set pointer to the next row or requested rowdb2_field_display_size — Returns the maximum number of bytes required to display a columndb2_field_name — Returns the name of the column in the result setdb2_field_num — Returns the position of the named column in a result setdb2_field_precision — Returns the precision of the indicated column in a result setdb2_field_scale — Returns the scale of the indicated column in a result setdb2_field_type — Returns the data type of the indicated column in a result setdb2_field_width — Returns the width of the current value of the indicated column in a result setdb2_foreign_keys — Returns a result set listing the foreign keys for a tabledb2_free_result — Frees resources associated with a result setdb2_free_stmt — Frees resources associated with the indicated statement resourcedb2_get_option — Retrieves an option value for a statement resource or a connection resourcedb2_last_insert_id — Returns the auto generated ID of the last insert query that successfully
executed on this connectiondb2_lob_read — Gets a user defined size of LOB files with each invocationdb2_next_result — Requests the next result set from a stored proceduredb2_num_fields — Returns the number of fields contained in a result setdb2_num_rows — Returns the number of rows affected by an SQL statementdb2_pclose — Closes a persistent database connectiondb2_pconnect — Returns a persistent connection to a databasedb2_prepare — Prepares an SQL statement to be executeddb2_primary_keys — Returns a result set listing primary keys for a tabledb2_procedure_columns — Returns a result set listing stored procedure parametersdb2_procedures — Returns a result set listing the stored procedures registered in a databasedb2_result — Returns a single column from a row in the result setdb2_rollback — Rolls back a transactiondb2_server_info — Returns an object with properties that describe the DB2 database serverdb2_set_option — Set options for connection or statement resourcesdb2_special_columns — Returns a result set listing the unique row identifier columns for a tabledb2_statistics — Returns a result set listing the index and statistics for a tabledb2_stmt_error — Returns a string containing the SQLSTATE returned by an SQL statementdb2_stmt_errormsg — Returns a string containing the last SQL statement error messagedb2_table_privileges — Returns a result set listing the tables and associated privileges in a databasedb2_tables — Returns a result set listing the tables and associated metadata in a database