svn: /phpdoc/en/trunk/ language-snippets.ent reference/mysql/functions/mysql-close.xml reference/mysqli/mysqli/close.xml
| From: | Philip Olson | Date: | Wed, 02 Sep 2015 23:30:35 +0000 |
| Subject: | svn: /phpdoc/en/trunk/ language-snippets.ent reference/mysql/functions/mysql-close.xml reference/mysqli/mysqli/close.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-13691@lists.php.net to get a copy of this message | ||
philip Wed, 02 Sep 2015 23:30:35 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=337721
Log:
Clarified that connections are closed when a script is finished. A user note by 'win at alinto
dot com' inspired this change. For good measure, refer to both result sets and connections.
Changed paths:
U phpdoc/en/trunk/language-snippets.ent
U phpdoc/en/trunk/reference/mysql/functions/mysql-close.xml
U phpdoc/en/trunk/reference/mysqli/mysqli/close.xml
Modified: phpdoc/en/trunk/language-snippets.ent
===================================================================
--- phpdoc/en/trunk/language-snippets.ent 2015-09-02 22:45:45 UTC (rev 337720)
+++ phpdoc/en/trunk/language-snippets.ent 2015-09-02 23:30:35 UTC (rev 337721)
@@ -1283,6 +1283,14 @@
<link linkend="faq.databases.mysql.deprecated">related FAQ entry</link> for
additional information.
Alternatives to this function include:</para>'>
+<!ENTITY mysql.close.connections.result.sets '<para xmlns="http://docbook.org/ns/docbook">
+Open non-persistent MySQL connections and result sets are automatically destroyed when a
+PHP script finishes its execution. So, while explicitly closing open
+connections and freeing result sets is optional, doing so is recommended.
+This will immediately return resources to PHP and MySQL, which can
+improve performance. For related information, see
+<link linkend="language.types.resource.self-destruct">freeing
resources</link></para>'>
+
<!-- Sybase Notes -->
<!ENTITY sybase.ct.only '<note xmlns="http://docbook.org/ns/docbook"><simpara>This
function is only available when
using the CT library interface to Sybase, and not with the DB library.
Modified: phpdoc/en/trunk/reference/mysql/functions/mysql-close.xml
===================================================================
--- phpdoc/en/trunk/reference/mysql/functions/mysql-close.xml 2015-09-02 22:45:45 UTC (rev 337720)
+++ phpdoc/en/trunk/reference/mysql/functions/mysql-close.xml 2015-09-02 23:30:35 UTC (rev 337721)
@@ -28,13 +28,7 @@
<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>
+ &mysql.close.connections.result.sets;
</refsect1>
<refsect1 role="parameters">
@@ -86,6 +80,8 @@
<para>
<function>mysql_close</function> will not close persistent links
created by <function>mysql_pconnect</function>.
+ For additional details, see the manual page on
+ <link linkend="features.persistent-connections">persistent
connections</link>.
</para>
</note>
</refsect1>
Modified: phpdoc/en/trunk/reference/mysqli/mysqli/close.xml
===================================================================
--- phpdoc/en/trunk/reference/mysqli/mysqli/close.xml 2015-09-02 22:45:45 UTC (rev 337720)
+++ phpdoc/en/trunk/reference/mysqli/mysqli/close.xml 2015-09-02 23:30:35 UTC (rev 337721)
@@ -22,6 +22,7 @@
<para>
Closes a previously opened database connection.
</para>
+ &mysql.close.connections.result.sets;
</refsect1>
<refsect1 role="parameters">
@@ -47,6 +48,17 @@
</para>
</refsect1>
+ <refsect1 role="notes">
+ &reftitle.notes;
+ <note>
+ <para>
+ <function>mysqli_close</function> will not close persistent connections.
+ For additional details, see the manual page on
+ <link linkend="features.persistent-connections">persistent
connections</link>.
+ </para>
+ </note>
+ </refsect1>
+
<refsect1 role="seealso">
&reftitle.seealso;
<para>
@@ -54,6 +66,7 @@
<member><methodname>mysqli::__construct</methodname></member>
<member><function>mysqli_init</function></member>
<member><function>mysqli_real_connect</function></member>
+ <member><function>mysqli_free_result</function></member>
</simplelist>
</para>
</refsect1>