PHP IBM DB2, Cloudscape and Apache Derby Functions
EditRocket provides the following information on IBM DB2, Cloudscape and Apache Derby functions in the PHP source code builder.
mixed db2_autocommit ( resource $connection [, bool $value ] ) - Sets or gets the AUTOCOMMIT behavior of the specified connection resource.
bool db2_bind_param ( resource $stmt , int $parameter-number , string $variable-name [, int $parameter-type [, int $data-type [, int $precision [, int $scale ]]]] ) -
object db2_client_info ( resource $connection ) - This function returns an object with read-only properties that return information about the DB2 database client.
bool db2_close ( resource $connection ) -
resource db2_column_privileges ( resource $connection [, string $qualifier [, string $schema [, string $table-name [, string $column-name ]]]] ) - Returns a result set listing the columns and associated privileges for a table.
resource db2_columns ( resource $connection [, string $qualifier [, string $schema [, string $table-name [, string $column-name ]]]] ) - Returns a result set listing the columns and associated metadata for a table.
bool db2_commit ( resource $connection ) - Commits an in-progress transaction on the specified connection resource and begins a new transaction. PHP applications normally default to AUTOCOMMIT mode, so db2_commit() is not necessary unless AUTOCOMMIT has been turned off for the connection resource.
string db2_conn_error ([ resource $connection ] ) - db2_conn_error() returns an SQLSTATE value representing the reason the last attempt to connect to a database failed.
string db2_conn_errormsg ([ resource $connection ] ) - db2_conn_errormsg() returns an error message and SQLCODE value representing the reason the last database connection attempt failed.
resource db2_connect ( string $database , string $username , string $password [, array $options ] ) - Creates a new connection to an IBM DB2 Universal Database, IBM Cloudscape, or Apache Derby database.
int db2_cursor_type ( resource $stmt ) - Returns the cursor type used by a statement resource. Use this to determine if you are working with a forward-only cursor or scrollable cursor.
string db2_escape_string ( string $string_literal ) - Prepends backslashes to special characters in the string argument.
resource db2_exec ( resource $connection , string $statement [, array $options ] ) - Executes an SQL statement directly.
bool db2_execute ( resource $stmt [, array $parameters ] ) -
array db2_fetch_array ( resource $stmt [, int $row_number ] ) - Returns an array, indexed by column position, representing a row in a result set. The columns are 0-indexed.
array db2_fetch_assoc ( resource $stmt [, int $row_number ] ) - Returns an array, indexed by column name, representing a row in a result set.
array db2_fetch_both ( resource $stmt [, int $row_number ] ) - Returns an array, indexed by both column name and position, representing a row in a result set.
object db2_fetch_object ( resource $stmt [, int $row_number ] ) - Returns an object in which each property represents a column returned in the row fetched from a result set.
bool db2_fetch_row ( resource $stmt [, int $row_number ] ) - 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.
int db2_field_display_size ( resource $stmt , mixed $column ) - Returns the maximum number of bytes required to display a column in a result set.
string db2_field_name ( resource $stmt , mixed $column ) - Returns the name of the specified column in the result set.
int db2_field_num ( resource $stmt , mixed $column ) - Returns the position of the named column in a result set.
int db2_field_precision ( resource $stmt , mixed $column ) - Returns the precision of the indicated column in a result set.
int db2_field_scale ( resource $stmt , mixed $column ) - Returns the scale of the indicated column in a result set.
string db2_field_type ( resource $stmt , mixed $column ) - Returns the data type 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.
resource db2_foreign_keys ( resource $connection , string $qualifier , string $schema , string $table-name ) - Returns a result set listing the foreign keys for a table.
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.
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.
string db2_get_option ( resource $resource , string $option ) - Retrieves the value of a specified option value for a statement resource or a connection resource.
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.
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 and return the result to a uniquely named PHP variable.
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.
int db2_num_rows ( resource $stmt ) - Returns the number of rows deleted, inserted, or updated by an SQL statement.
resource db2_pconnect ( string $database , string $username , string $password [, array $options ] ) - Returns a persistent connection to an IBM DB2 Universal Database, IBM Cloudscape, or Apache Derby database.
resource db2_prepare ( resource $connection , string $statement [, array $options ] ) - db2_prepare() creates a prepared SQL statement which can include 0 or more parameter markers (? characters) representing parameters for input, output, or input/output.
resource db2_primary_keys ( resource $connection , string $qualifier , string $schema , string $table-name ) - Returns a result set listing the primary keys for a table.
resource db2_procedure_columns ( resource $connection , string $qualifier , string $schema , string $procedure , string $parameter ) - Returns a result set listing the parameters for one or more stored procedures.
resource db2_procedures ( resource $connection , string $qualifier , string $schema , string $procedure ) - Returns a result set listing the stored procedures registered in a database.
mixed db2_result ( resource $stmt , mixed $column ) - Use db2_result() to return the value of a specified column in the current row of a result set.
bool db2_rollback ( resource $connection ) - Rolls back an in-progress transaction on the specified connection resource and begins a new transaction. PHP applications normally default to AUTOCOMMIT mode, so db2_rollback() normally has no effect unless AUTOCOMMIT has been turned off for the connection resource.
object db2_server_info ( resource $connection ) - This function returns an object with read-only properties that return information about the IBM DB2, Cloudscape, or Apache Derby database server.
bool db2_set_option ( resource $resource , array $options , int $type ) - Sets options for a statement resource or a connection resource. You cannot set options for result set resources.
resource db2_special_columns ( resource $connection , string $qualifier , string $schema , string $table_name , int $scope ) - Returns a result set listing the unique row identifier columns for a table.
resource db2_statistics ( resource $connection , string $qualifier , string $schema , string $table-name , bool $unique ) - Returns a result set listing the index and statistics for a table.
string db2_stmt_error ([ resource $stmt ] ) - Returns a string containing the SQLSTATE value returned by an SQL statement.
string db2_stmt_errormsg ([ resource $stmt ] ) - Returns a string containing the last SQL statement error message.
resource db2_table_privileges ( resource $connection [, string $qualifier [, string $schema [, string $table_name ]]] ) - Returns a result set listing the tables and associated privileges in a database.
resource db2_tables ( resource $connection [, string $qualifier [, string $schema [, string $table-name [, string $table-type ]]]] ) - Returns a result set listing the tables and associated metadata in a database.