php-doc-en/reference/mysql/functions/mysql-get-host-info.xml
Friedhelm Betz 8bddf50657 examples start at col 0
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@147872 c90b9560-bf6c-de11-be94-00142212c4b1
2004-01-05 13:03:26 +00:00

72 lines
2.1 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.62 -->
<refentry id="function.mysql-get-host-info">
<refnamediv>
<refname>mysql_get_host_info</refname>
<refpurpose>Get MySQL host info</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>mysql_get_host_info</methodname>
<methodparam choice="opt"><type>resource</type><parameter>link_identifier</parameter></methodparam>
</methodsynopsis>
<para>
<function>mysql_get_host_info</function> returns a string
describing the type of connection in use for the connection
<parameter>link_identifier</parameter>, including the server host
name. If <parameter>link_identifier</parameter> is omitted, the
last opened connection will be used.
</para>
<para>
<example>
<title><function>mysql_get_host_info</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
mysql_connect("localhost", "mysql_user", "mysql_password")
or die("Could not connect: " . mysql_error());
printf("MySQL host info: %s\n", mysql_get_host_info());
?>
]]>
</programlisting>
<para>
The above example would produce the following output:
</para>
<screen>
<![CDATA[
MySQL host info: Localhost via UNIX socket
]]>
</screen>
</example>
</para>
<para>
See also
<function>mysql_get_client_info</function>,
<function>mysql_get_proto_info</function> and
<function>mysql_get_server_info</function>.
</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
-->