maxdb_get_proto_info

maxdb::protocol_version

(PECL maxdb >= 1.0)

maxdb_get_proto_info -- maxdb::protocol_versionReturns the version of the MaxDB protocol used

说明

过程化风格

maxdb_get_proto_info ( resource $link ) : int

面向对象风格

string $maxdb->protocol_version;

Returns an integer representing the MaxDB protocol version used by the connection represented by the link parameter.

返回值

Returns an integer representing the protocol version (constant 10).

范例

Example #1 面向对象风格

<?php
$maxdb 
= new maxdb("localhost""MONA""RED""DEMODB");

/* check connection */
if (maxdb_connect_errno()) {
   
printf("Connect failed: %s\n"maxdb_connect_error());
   exit();
}

/* print protocol version */
printf("Protocol version: %d\n"$maxdb->protocol_version);

/* close connection */
$maxdb->close();
?>

Example #2 过程化风格

<?php
$link 
maxdb_connect("localhost""MONA""RED""DEMODB");

/* check connection */
if (maxdb_connect_errno()) {
   
printf("Connect failed: %s\n"maxdb_connect_error());
   exit();
}

/* print protocol version */
printf("Protocol version: %d\n"maxdb_get_proto_info($link));

/* close connection */
maxdb_close($link);
?>

以上例程的输出类似于:

Protocol version: 10

参见

相关文章
php ibm db2 函数 returns the cursor type used by a statement resourcephp gnupg 函数 returns the currently active protocol for all operationsphp mcve 函数 returns array of strings which represents the keys that can be used for response parameters on this transactionphp maxdb 函数 returns the error code from last connect callphp maxdb 函数 returns a string description of the last connect errorphp maxdb 函数 returns the next field in the result setphp maxdb 函数 returns an array of resources representing the fields in a result setphp maxdb 函数 returns a string representing the type of connection usedphp maxdb 函数 returns the version of the maxdb protocol usedphp maxdb 函数 returns the version of the maxdb serverphp maxdb 函数 returns the version of the maxdb server as an integerphp maxdb 函数 returns the auto generated id used in the last queryphp maxdb 函数 returns the sqlstate error from previous maxdb operationphp maxdb 函数 used for establishing secure connections using sslphp maxdb 函数 returns the total number of rows changed deleted or inserted by the last executed statementphp maxdb 函数 initializes a statement and returns an resource for use with maxdb stmt preparephp maxdb 函数 returns the number of parameter for the given statementphp maxdb 函数 returns result set metadata from a prepared statementphp mysqlnd ms 函数 returns an array which describes the last used connectionphp svn 函数 creates and returns a stream that will be used to replace
关注编程学问公众号