Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : IBM DB2, Cloudscape and Apache Derby Functions : db2_client_info

db2_client_info

Returns an object with properties that describe the DB2 database client (PECL ibm_db2:1.1.1-1.6.2)
object db2_client_info ( resource connection )

Example 916. A db2_client_info() example

To retrieve information about the client, you must pass a valid database connection resource to db2_client_info().

<?php
$conn
= db2_connect( 'SAMPLE', 'db2inst1', 'ibmdb2' );
$client = db2_client_info( $conn );

if (
$client) {
   echo
"DRIVER_NAME: ";           var_dump( $client->DRIVER_NAME );
   echo
"DRIVER_VER: ";            var_dump( $client->DRIVER_VER );
   echo
"DATA_SOURCE_NAME: ";      var_dump( $client->DATA_SOURCE_NAME );
   echo
"DRIVER_ODBC_VER: ";       var_dump( $client->DRIVER_ODBC_VER );
   echo
"ODBC_VER: ";              var_dump( $client->ODBC_VER );
   echo
"ODBC_SQL_CONFORMANCE: ";  var_dump( $client->ODBC_SQL_CONFORMANCE );
   echo
"APPL_CODEPAGE: ";         var_dump( $client->APPL_CODEPAGE );
   echo
"CONN_CODEPAGE: ";         var_dump( $client->CONN_CODEPAGE );
}
else {
   echo
"Error retrieving client information.
    Perhaps your database connection was invalid."
;
}
db2_close($conn);

?>

The above example will output:

DRIVER_NAME: string(8) "libdb2.a"
DRIVER_VER: string(10) "08.02.0001"
DATA_SOURCE_NAME: string(6) "SAMPLE"
DRIVER_ODBC_VER: string(5) "03.51"
ODBC_VER: string(10) "03.01.0000"
ODBC_SQL_CONFORMANCE: string(8) "EXTENDED"
APPL_CODEPAGE: int(819)
CONN_CODEPAGE: int(819)

Change Language


Follow Navioo On Twitter
db2_autocommit
db2_bind_param
db2_client_info
db2_close
db2_column_privileges
db2_columns
db2_commit
db2_conn_error
db2_conn_errormsg
db2_connect
db2_cursor_type
db2_escape_string
db2_exec
db2_execute
db2_fetch_array
db2_fetch_assoc
db2_fetch_both
db2_fetch_object
db2_fetch_row
db2_field_display_size
db2_field_name
db2_field_num
db2_field_precision
db2_field_scale
db2_field_type
db2_field_width
db2_foreign_keys
db2_free_result
db2_free_stmt
db2_get_option
db2_lob_read
db2_next_result
db2_num_fields
db2_num_rows
db2_pconnect
db2_prepare
db2_primary_keys
db2_procedure_columns
db2_procedures
db2_result
db2_rollback
db2_server_info
db2_set_option
db2_special_columns
db2_statistics
db2_stmt_error
db2_stmt_errormsg
db2_table_privileges
db2_tables
eXTReMe Tracker