reference/mysql/functions/mysql-connect.xml
554db5a3a3ac77910d68349eefa37e2c9a9da628
...
...
@@ -19,11 +19,11 @@
19
19
<refsect1 role="description">
20
20
&reftitle.description;
21
21
<methodsynopsis>
22
-
<type>resource</type><methodname>mysql_connect</methodname>
22
+
<type class="union"><type>resource</type><type>false</type></type><methodname>mysql_connect</methodname>
23
23
<methodparam choice="opt"><type>string</type><parameter>server</parameter><initializer>ini_get("mysql.default_host")</initializer></methodparam>
24
24
<methodparam choice="opt"><type>string</type><parameter>username</parameter><initializer>ini_get("mysql.default_user")</initializer></methodparam>
25
25
<methodparam choice="opt"><type>string</type><parameter>password</parameter><initializer>ini_get("mysql.default_password")</initializer></methodparam>
26
-
<methodparam choice="opt"><type>bool</type><parameter>new_link</parameter><initializer>false</initializer></methodparam>
26
+
<methodparam choice="opt"><type>bool</type><parameter>new_link</parameter><initializer>&false;</initializer></methodparam>
27
27
<methodparam choice="opt"><type>int</type><parameter>client_flags</parameter><initializer>0</initializer></methodparam>
28
28
</methodsynopsis>
29
29
<para>
...
...
@@ -114,31 +114,6 @@
114
114
</para>
115
115
</refsect1>
116
116

117
-
<refsect1 role="changelog">
118
-
&reftitle.changelog;
119
-
<para>
120
-
<informaltable>
121
-
<tgroup cols="2">
122
-
<thead>
123
-
<row>
124
-
<entry>&Version;</entry>
125
-
<entry>&Description;</entry>
126
-
</row>
127
-
</thead>
128
-
<tbody>
129
-
<row>
130
-
<entry>5.5.0</entry>
131
-
<entry>
132
-
This function will generate an <constant>E_DEPRECATED</constant>
133
-
error.
134
-
</entry>
135
-
</row>
136
-
</tbody>
137
-
</tgroup>
138
-
</informaltable>
139
-
</para>
140
-
</refsect1>
141
-

142
117
<refsect1 role="examples">
143
118
&reftitle.examples;
144
119
<para>
...
...
@@ -224,9 +199,9 @@ mysql_close($link);
224
199
override this and try to connect to a local socket (named pipe on
225
200
Windows). If you want to use TCP/IP, use &quot;127.0.0.1&quot;
226
201
instead of &quot;localhost&quot;. If the MySQL client library tries to
227
-
connect to the wrong local socket, you should set the correct path as
228
-
<xref linkend="ini.mysql.default-host" /> in your PHP configuration and leave the server field
229
-
blank.
202
+
connect to the wrong local socket, the correct path should be set as
203
+
<link linkend="ini.mysql.default-host">mysql.default_host</link> in &php.ini; and the server field
204
+
left blank.
230
205
</para>
231
206
</note>
232
207
<note>
...
...
@@ -238,13 +213,6 @@ mysql_close($link);
238
213
</note>
239
214
<note>
240
215
<para>
241
-
You can suppress the error message on failure by prepending
242
-
a <link linkend="language.operators.errorcontrol">@</link>
243
-
to the function name.
244
-
</para>
245
-
</note>
246
-
<note>
247
-
<para>
248
216
Error "Can't create TCP/IP socket (10106)" usually means that the <link
249
217
linkend="ini.variables-order">variables_order</link> configure directive
250
218
doesn't contain character <literal>E</literal>. On Windows, if the
251
219