<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 -->
  <refentry id="function.mysql-close">
   <refnamediv>
    <refname>mysql_close</refname>
    <refpurpose>Close MySQL connection</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>bool</type><methodname>mysql_close</methodname>
      <methodparam choice="opt"><type>resource</type><parameter>
        link_identifier
       </parameter></methodparam>
     </methodsynopsis>
    <para>
     &return.success;
    </para>
    <para> <function>mysql_close</function> closes the connection to
    the MySQL server that's associated with the specified link
    identifier. If <parameter>link_identifier</parameter> isn't
    specified, the last opened link is used.
    </para>
    <para>
     Using <function>mysql_close</function> isn't usually necessary,
     as non-persistent open links are automatically closed at the end
     of the script's execution. See also
     <link linkend="language.types.resource.self-destruct">freeing
     resources</link>.
    </para>
    <note>
     <para>
      <function>mysql_close</function> will not close persistent links
      created by <function>mysql_pconnect</function>.
     </para>
    </note>
    <para>
     <example>
      <title><function>mysql_close</function> example</title>
      <programlisting role="php">
<![CDATA[
<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
    die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>
]]>
      </programlisting>
     </example>
    </para>
    <para>
     See also <function>mysql_connect</function> and
     <function>mysql_pconnect</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
-->