2002-04-15 00:12:54 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2002-12-02 02:37:29 +00:00
|
|
|
<!-- $Revision: 1.5 $ -->
|
2002-04-15 00:12:54 +00:00
|
|
|
<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.62 -->
|
|
|
|
<refentry id="function.mysql-get-proto-info">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>mysql_get_proto_info</refname>
|
|
|
|
<refpurpose>Get MySQL protocol info</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<methodsynopsis>
|
|
|
|
<type>int</type><methodname>mysql_get_proto_info</methodname>
|
|
|
|
<methodparam choice="opt"><type>resource</type><parameter>link_identifier</parameter></methodparam>
|
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
|
|
<function>mysql_get_proto_info</function> returns the protocol
|
|
|
|
version used by connection
|
|
|
|
<parameter>link_identifier</parameter>. If
|
|
|
|
<parameter>link_identifier</parameter> is omitted, the last opened
|
|
|
|
connection will be used.
|
|
|
|
</para>
|
2002-04-21 16:08:19 +00:00
|
|
|
<example>
|
|
|
|
<title>mysql_get_proto_info Example</title>
|
|
|
|
<programlisting role="php">
|
|
|
|
<![CDATA[
|
|
|
|
<?php
|
2002-04-21 16:34:47 +00:00
|
|
|
mysql_connect("localhost", "mysql_user", "mysql_password") or
|
2002-12-02 02:37:29 +00:00
|
|
|
die("Could not connect: " . mysql_error());
|
2002-04-21 16:08:19 +00:00
|
|
|
printf ("MySQL protocol version: %s\n", mysql_get_proto_info());
|
|
|
|
?>
|
|
|
|
]]>
|
|
|
|
</programlisting>
|
|
|
|
<para>
|
|
|
|
The above example would produce the following output:
|
|
|
|
</para>
|
|
|
|
<screen>
|
|
|
|
<![CDATA[
|
|
|
|
MySQL protocol version : 10
|
|
|
|
]]>
|
|
|
|
</screen>
|
|
|
|
</example>
|
2002-04-15 00:12:54 +00:00
|
|
|
<para>
|
2002-04-21 16:08:19 +00:00
|
|
|
See also: <function>mysql_get_client_info</function>,
|
|
|
|
<function>mysql_get_host_info</function> and
|
|
|
|
<function>mysql_get_server_info</function>.
|
2002-04-15 00:12:54 +00:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:t
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
indent-tabs-mode:nil
|
|
|
|
sgml-parent-document:nil
|
|
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
vi: ts=1 sw=1
|
|
|
|
-->
|