cvs commit
| From: | eschmid | Date: | Sun, 04 Jul 1999 13:28:21 +0000 |
| Subject: | cvs commit | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-8072@lists.php.net to get a copy of this message | ||
From: eschmid
Date: Sun Jul 4 13:28:21 1999
Modified files:
phpdoc/functions/mysql.sgml
Log message:
Added /path/to/socket and some minor improvements. Open for improvements.
Prototypes corrections follow soon.
Index: phpdoc/functions/mysql.sgml
diff -u phpdoc/functions/mysql.sgml:1.5 phpdoc/functions/mysql.sgml:1.6
--- phpdoc/functions/mysql.sgml:1.5 Thu Jul 1 17:41:35 1999
+++ phpdoc/functions/mysql.sgml Sun Jul 4 13:28:21 1999
@@ -80,9 +80,14 @@
<title>Description</title>
<funcsynopsis>
<funcdef>int <function>mysql_connect</function></funcdef>
- <paramdef>string <parameter><optional>hostname</optional>
- <optional>:port</optional></parameter>
- </paramdef>
+ <paramdef>string
+ <parameter>
+ <optional>hostname
+ <optional>:port</optional>
+ <optional>:/path/to/socket</optional>
+ </optional>
+ </parameter>
+ </paramdef>
<paramdef>string <parameter><optional>username</optional>
</parameter></paramdef>
<paramdef>string <parameter><optional>password</optional>
@@ -95,21 +100,30 @@
<function>mysql_connect</function> establishes a connection to a
MySQL server. All of the arguments are optional, and if they're
missing, defaults are assumed ('localhost', user name of the user
- that owns the server process, empty password). The hostname
- string can also include a port number.
- eg. "hostname:port"
+ that owns the server process, empty password).
+ <para>
+ The hostname string can also include a port
+ number. eg. "hostname:port" or a path to a socket
+ eg. ":/path/to/socket" for the localhost.
+ <note>
+ <para>
+ Support for ":port" wass added in 3.0B4.
+ <para>
+ Support for the ":/path/to/socket" was added in
+ 3.0.10.
+ </note>
<para>
In case a second call is made to
<function>mysql_connect</function> with the same arguments, no
new link will be established, but instead, the link identifier of
the already opened link will be returned.
- <para>
+ <para>
The link to the server will be closed as soon as the execution of
the script ends, unless it's closed earlier by explicitly calling
+ <function>mysql_close</function>.
+ <para> See also
+ <function>mysql_pconnect</function>, and
<function>mysql_close</function>.
- <para>
- See also <function>mysql_pconnect</function>, and
- <function>mysql_close</function>.
</refsect1>
</refentry>
@@ -906,25 +920,49 @@
<refentry id="function.mysql-pconnect">
<refnamediv>
<refname>mysql_pconnect</refname>
- <refpurpose>Open a persistent connection to a MySQL
- Server</refpurpose>
+ <refpurpose>
+ Open a persistent connection to a MySQL Server
+ </refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcdef>int <function>mysql_pconnect</function></funcdef>
- <paramdef>string <parameter><optional>hostname</optional>
- <optional>:port</optional>
- </parameter></paramdef>
- <paramdef>string <parameter><optional>username</optional>
- </parameter></paramdef>
- <paramdef>string <parameter><optional>password</optional>
- </parameter></paramdef>
+ <paramdef>string
+ <parameter>
+ <optional>hostname
+ <optional>:port</optional>
+ <optional>:/path/to/socket</optional>
+ </optional>
+ </parameter>
+ </paramdef>
+ <paramdef>string
+ <parameter><optional>username</optional></parameter>
+ </paramdef>
+ <paramdef>string
+ <parameter><optional>password</optional></parameter>
+ </paramdef>
</funcsynopsis>
<para>
Returns: A positive MySQL persistent link identifier on success,
or false on error
<para>
+ <function>mysql_pconnect</function> establishes a connection to a
+ MySQL server. All of the arguments are optional, and if they're
+ missing, defaults are assumed ('localhost', user name of the user
+ that owns the server process, empty password).
+ <para>
+ The hostname string can also include a port
+ number. eg. "hostname:port" or a path to a socket
+ eg. ":/path/to/socket" for the localhost.
+ <note>
+ <para>
+ Support for ":port" wass added in 3.0B4.
+ <para>
+ Support for the ":/path/to/socket" was added in
+ 3.0.10.
+ </note>
+ <para>
<function>mysql_pconnect</function> acts very much like
<function>mysql_connect</function> with two major differences.
<para>
@@ -936,7 +974,7 @@
Second, the connection to the SQL server will not be closed when
the execution of the script ends. Instead, the link will remain
open for future use (<function>mysql_close</function> will not
- close links established by <literal>mysql_pconnect()</literal>).
+ close links established by <function>mysql_pconnect</function>).
<para>
This type of links is therefore called 'persistent'.
</refsect1>