mysql_get_proto_info

(PHP 4 >= 4.0.5, PHP 5)

mysql_get_proto_info -- Get MySQL protocol info

Description

int mysql_get_proto_info ( [resource link_identifier])

mysql_get_proto_info() returns the protocol version used by connection link_identifier. If link_identifier is omitted, the last opened connection will be used.

Example 1. mysql_get_proto_info() example

<?php
$link
= mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!
$link) {
    die(
'Could not connect: ' . mysql_error());
}
printf("MySQL protocol version: %s\n", mysql_get_proto_info());
?>

The above example would produce the following output:

MySQL protocol version: 10

See also mysql_get_client_info(), mysql_get_host_info() and mysql_get_server_info().


Sites of interest: Web Hosting : Reseller Hosting : Website Hosting : HTML Editor : Web Design Templates : Free Web Hosting : ASP code examples : PHP & MySQL Code Examples
  Copyright © 2004 Evrsoft Developer Network. Privacy policy - Link to Us

Contact Evrsoft