PHP mysql_get_proto_info() Function

Definition and Usage

The mysql_get_proto_info() function returns information about the MySQL protocol.

If successful, returns the version of the MySQL protocol, if failed, returns false.

Syntax

mysql_get_proto_info(connection)
Parameters Description
connection Optional. Specifies the MySQL connection. If not specified, the previous connection is used.

Example

<?php
$con = mysql_connect("localhost", "hello", "321");
echo "MySQL protocol info: " . mysql_get_proto_info($con);
?>

Output:

MySQL protocol info: 10