reference/pdo_mysql/constants.xml
b2a7a5fab7231fa8634096f111ae0fa0dc60bcfe
...
...
@@ -1,252 +1,226 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<section xml:id="pdo-mysql.constants" xmlns="http://docbook.org/ns/docbook">
3
+
<section xml:id="ref.pdo-mysql.constants" xmlns="http://docbook.org/ns/docbook">
4
4
&reftitle.constants;
5
5
&pdo.driver-constants;
6
6
<variablelist>
7
7
<varlistentry xml:id="pdo.constants.mysql-attr-use-buffered-query">
8
8
<term>
9
9
<constant>PDO::MYSQL_ATTR_USE_BUFFERED_QUERY</constant>
10
-
(<type>integer</type>)
10
+
(<type>int</type>)
11
11
</term>
12
12
<listitem>
13
13
<simpara>
14
-
If this attribute is set to &true; on a
15
-
<classname>PDOStatement</classname>, the MySQL driver will use the
16
-
buffered versions of the MySQL API. If you're writing portable code, you
17
-
should use <function>PDOStatement::fetchAll</function> instead.
14
+
&Alias; <constant>Pdo\Mysql::ATTR_USE_BUFFERED_QUERY</constant>
18
15
</simpara>
19
-
<para>
20
-
<example><title>Forcing queries to be buffered in mysql</title>
21
-
<programlisting role="php">
22
-
<![CDATA[
23
-
<?php
24
-
if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') {
25
-
$stmt = $db->prepare('select * from foo',
26
-
array(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true));
27
-
} else {
28
-
die("my application only works with mysql; I should use \$stmt->fetchAll() instead");
29
-
}
30
-
?>
31
-
]]>
32
-
</programlisting>
33
-
</example>
34
-
</para>
35
16
</listitem>
36
17
</varlistentry>
37
18
<varlistentry xml:id="pdo.constants.mysql-attr-local-infile">
38
19
<term>
39
20
<constant>PDO::MYSQL_ATTR_LOCAL_INFILE</constant>
40
-
(<type>integer</type>)
21
+
(<type>int</type>)
41
22
</term>
42
23
<listitem>
43
-
<para>
44
-
Enable <literal>LOAD LOCAL INFILE</literal>.
45
-
</para>
46
-
<para>
47
-
Note, this constant can only be used in the <parameter>driver_options</parameter>
48
-
array when constructing a new database handle.
49
-
</para>
24
+
<simpara>
25
+
&Alias; <constant>Pdo\Mysql::ATTR_LOCAL_INFILE</constant>
26
+
</simpara>
27
+
</listitem>
28
+
</varlistentry>
29
+
<varlistentry xml:id="pdo.constants.mysql-attr-local-infile-directory">
30
+
<term>
31
+
<constant>PDO::MYSQL_ATTR_LOCAL_INFILE_DIRECTORY</constant>
32
+
(<type>int</type>)
33
+
</term>
34
+
<listitem>
35
+
<simpara>
36
+
&Alias; <constant>Pdo\Mysql::ATTR_LOCAL_INFILE_DIRECTORY</constant>.
37
+
Available as of PHP 8.1.0.
38
+
</simpara>
50
39
</listitem>
51
40
</varlistentry>
52
41
<varlistentry xml:id="pdo.constants.mysql-attr-init-command">
53
42
<term>
54
43
<constant>PDO::MYSQL_ATTR_INIT_COMMAND</constant>
55
-
(<type>integer</type>)
44
+
(<type>int</type>)
56
45
</term>
57
46
<listitem>
58
-
<para>
59
-
Command to execute when connecting to the MySQL server. Will
60
-
automatically be re-executed when reconnecting.
61
-
</para>
62
-
<para>
63
-
Note, this constant can only be used in the <parameter>driver_options</parameter>
64
-
array when constructing a new database handle.
65
-
</para>
47
+
<simpara>
48
+
&Alias; <constant>Pdo\Mysql::ATTR_INIT_COMMAND</constant>
49
+
</simpara>
66
50
</listitem>
67
51
</varlistentry>
68
52
<varlistentry xml:id="pdo.constants.mysql-attr-read-default-file">
69
53
<term>
70
54
<constant>PDO::MYSQL_ATTR_READ_DEFAULT_FILE</constant>
71
-
(<type>integer</type>)
55
+
(<type>int</type>)
72
56
</term>
73
57
<listitem>
74
-
<para>
75
-
Read options from the named option file instead of from
76
-
<filename>my.cnf</filename>. This option is not available if
77
-
mysqlnd is used, because mysqlnd does not read the mysql
78
-
configuration files.
79
-
</para>
58
+
<simpara>
59
+
&Alias; <constant>Pdo\Mysql::ATTR_READ_DEFAULT_FILE</constant>
60
+
</simpara>
80
61
</listitem>
81
62
</varlistentry>
82
63
<varlistentry xml:id="pdo.constants.mysql-attr-read-default-group">
83
64
<term>
84
65
<constant>PDO::MYSQL_ATTR_READ_DEFAULT_GROUP</constant>
85
-
(<type>integer</type>)
66
+
(<type>int</type>)
86
67
</term>
87
68
<listitem>
88
-
<para>
89
-
Read options from the named group from <filename>my.cnf</filename> or the
90
-
file specified with <constant>MYSQL_READ_DEFAULT_FILE</constant>. This option
91
-
is not available if mysqlnd is used, because mysqlnd does not read the mysql
92
-
configuration files.
93
-
</para>
69
+
<simpara>
70
+
&Alias; <constant>Pdo\Mysql::ATTR_READ_DEFAULT_GROUP</constant>
71
+
</simpara>
94
72
</listitem>
95
73
</varlistentry>
96
74
<varlistentry xml:id="pdo.constants.mysql-attr-max-buffer-size">
97
75
<term>
98
76
<constant>PDO::MYSQL_ATTR_MAX_BUFFER_SIZE</constant>
99
-
(<type>integer</type>)
77
+
(<type>int</type>)
100
78
</term>
101
79
<listitem>
102
-
<para>
103
-
Maximum buffer size. Defaults to 1 MiB. This constant is not supported when
104
-
compiled against mysqlnd.
105
-
</para>
80
+
<simpara>
81
+
&Alias; <constant>Pdo\Mysql::ATTR_MAX_BUFFER_SIZE</constant>
82
+
</simpara>
106
83
</listitem>
107
84
</varlistentry>
108
85
<varlistentry xml:id="pdo.constants.mysql-attr-direct-query">
109
86
<term>
110
87
<constant>PDO::MYSQL_ATTR_DIRECT_QUERY</constant>
111
-
(<type>integer</type>)
88
+
(<type>int</type>)
112
89
</term>
113
90
<listitem>
114
-
<para>
115
-
Perform direct queries, don't use prepared statements.
116
-
</para>
91
+
<simpara>
92
+
&Alias; <constant>PDO::ATTR_EMULATE_PREPARES</constant>
93
+
</simpara>
117
94
</listitem>
118
95
</varlistentry>
119
96
<varlistentry xml:id="pdo.constants.mysql-attr-found-rows">
120
97
<term>
121
98
<constant>PDO::MYSQL_ATTR_FOUND_ROWS</constant>
122
-
(<type>integer</type>)
99
+
(<type>int</type>)
123
100
</term>
124
101
<listitem>
125
-
<para>
126
-
Return the number of found (matched) rows, not the
127
-
number of changed rows.
128
-
</para>
102
+
<simpara>
103
+
&Alias; <constant>Pdo\Mysql::ATTR_FOUND_ROWS</constant>
104
+
</simpara>
129
105
</listitem>
130
106
</varlistentry>
131
107
<varlistentry xml:id="pdo.constants.mysql-attr-ignore-space">
132
108
<term>
133
109
<constant>PDO::MYSQL_ATTR_IGNORE_SPACE</constant>
134
-
(<type>integer</type>)
110
+
(<type>int</type>)
135
111
</term>
136
112
<listitem>
137
-
<para>
138
-
Permit spaces after function names. Makes all functions
139
-
names reserved words.
140
-
</para>
113
+
<simpara>
114
+
&Alias; <constant>Pdo\Mysql::ATTR_IGNORE_SPACE</constant>
115
+
</simpara>
141
116
</listitem>
142
117
</varlistentry>
143
118
<varlistentry xml:id="pdo.constants.mysql-attr-compress">
144
119
<term>
145
120
<constant>PDO::MYSQL_ATTR_COMPRESS</constant>
146
-
(<type>integer</type>)
121
+
(<type>int</type>)
147
122
</term>
148
123
<listitem>
149
-
<para>
150
-
Enable network communication compression. This is also supported when
151
-
compiled against mysqlnd as of PHP 5.3.11.
152
-
</para>
124
+
<simpara>
125
+
&Alias; <constant>Pdo\Mysql::ATTR_COMPRESS</constant>
126
+
</simpara>
127
+
</listitem>
128
+
</varlistentry>
129
+

130
+
<varlistentry xml:id="pdo.constants.mysql-attr-server-public-key">
131
+
<term>
132
+
<constant>PDO::MYSQL_ATTR_SERVER_PUBLIC_KEY</constant>
133
+
(<type>int</type>)
134
+
</term>
135
+
<listitem>
136
+
<simpara>
137
+
&Alias; <constant>Pdo\Mysql::ATTR_SERVER_PUBLIC_KEY</constant>
138
+
</simpara>
153
139
</listitem>
154
140
</varlistentry>
155
141

156
142
<varlistentry xml:id="pdo.constants.mysql-attr-ssl-ca">
157
143
<term>
158
144
<constant>PDO::MYSQL_ATTR_SSL_CA</constant>
159
-
(<type>integer</type>)
145
+
(<type>int</type>)
160
146
</term>
161
147
<listitem>
162
-
<para>
163
-
The file path to the SSL certificate authority.
164
-
</para>
165
-
<para>
166
-
&version.exists.asof; 5.3.7.
167
-
</para>
148
+
<simpara>
149
+
&Alias; <constant>Pdo\Mysql::ATTR_SSL_CA</constant>
150
+
</simpara>
168
151
</listitem>
169
152
</varlistentry>
170
153

171
154
<varlistentry xml:id="pdo.constants.mysql-attr-ssl-capath">
172
155
<term>
173
156
<constant>PDO::MYSQL_ATTR_SSL_CAPATH</constant>
174
-
(<type>integer</type>)
157
+
(<type>int</type>)
175
158
</term>
176
159
<listitem>
177
-
<para>
178
-
The file path to the directory that contains the trusted SSL
179
-
CA certificates, which are stored in PEM format.
180
-
</para>
181
-
<para>
182
-
&version.exists.asof; 5.3.7.
183
-
</para>
160
+
<simpara>
161
+
&Alias; <constant>Pdo\Mysql::ATTR_SSL_CAPATH</constant>
162
+
</simpara>
184
163
</listitem>
185
164
</varlistentry>
186
165

187
166
<varlistentry xml:id="pdo.constants.mysql-attr-ssl-cert">
188
167
<term>
189
168
<constant>PDO::MYSQL_ATTR_SSL_CERT</constant>
190
-
(<type>integer</type>)
169
+
(<type>int</type>)
191
170
</term>
192
171
<listitem>
193
-
<para>
194
-
The file path to the SSL certificate.
195
-
</para>
196
-
<para>
197
-
&version.exists.asof; 5.3.7.
198
-
</para>
172
+
<simpara>
173
+
&Alias; <constant>Pdo\Mysql::ATTR_SSL_CERT</constant>
174
+
</simpara>
199
175
</listitem>
200
176
</varlistentry>
201
177

202
-
<varlistentry xml:id="pdo.constants.mysql-attr-cipher">
178
+
<varlistentry xml:id="pdo.constants.mysql-attr-ssl-cipher">
203
179
<term>
204
180
<constant>PDO::MYSQL_ATTR_SSL_CIPHER</constant>
205
-
(<type>integer</type>)
181
+
(<type>int</type>)
206
182
</term>
207
183
<listitem>
208
-
<para>
209
-
A list of one or more permissible ciphers to use for SSL encryption, in a format
210
-
understood by OpenSSL. For example: <literal>DHE-RSA-AES256-SHA:AES128-SHA</literal>
211
-
</para>
212
-
<para>
213
-
&version.exists.asof; 5.3.7.
214
-
</para>
184
+
<simpara>
185
+
&Alias; <constant>Pdo\Mysql::ATTR_SSL_CIPHER</constant>
186
+
</simpara>
215
187
</listitem>
216
188
</varlistentry>
217
189

218
-
<varlistentry xml:id="pdo.constants.mysql-attr-key">
190
+
<varlistentry xml:id="pdo.constants.mysql-attr-ssl-key">
219
191
<term>
220
192
<constant>PDO::MYSQL_ATTR_SSL_KEY</constant>
221
-
(<type>integer</type>)
193
+
(<type>int</type>)
222
194
</term>
223
195
<listitem>
224
-
<para>
225
-
The file path to the SSL key.
226
-
</para>
227
-
<para>
228
-
&version.exists.asof; 5.3.7.
229
-
</para>
196
+
<simpara>
197
+
&Alias; <constant>Pdo\Mysql::ATTR_SSL_KEY</constant>
198
+
</simpara>
199
+
</listitem>
200
+
</varlistentry>
201
+

202
+
<varlistentry xml:id="pdo.constants.mysql-attr-ssl-verify-server-cert">
203
+
<term>
204
+
<constant>PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT</constant>
205
+
(<type>int</type>)
206
+
</term>
207
+
<listitem>
208
+
<simpara>
209
+
&Alias; <constant>Pdo\Mysql::ATTR_SSL_VERIFY_SERVER_CERT</constant>
210
+
Available as of PHP 7.0.18 and PHP 7.1.4.
211
+
</simpara>
230
212
</listitem>
231
213
</varlistentry>
232
214

233
215
<varlistentry xml:id="pdo.constants.mysql-attr-multi-statements">
234
216
<term>
235
217
<constant>PDO::MYSQL_ATTR_MULTI_STATEMENTS</constant>
236
-
(<type>integer</type>)
218
+
(<type>int</type>)
237
219
</term>
238
220
<listitem>
239
-
<para>
240
-
Disables multi query execution in both <function>PDO::prepare</function>
241
-
and <function>PDO::query</function> when set to &false;.
242
-
</para>
243
-
<para>
244
-
Note, this constant can only be used in the <parameter>driver_options</parameter>
245
-
array when constructing a new database handle.
246
-
</para>
247
-
<para>
248
-
&version.exists.asof; 5.5.21 and PHP 5.6.5.
249
-
</para>
221
+
<simpara>
222
+
&Alias; <constant>Pdo\Mysql::ATTR_MULTI_STATEMENTS</constant>
223
+
</simpara>
250
224
</listitem>
251
225
</varlistentry>
252
226

253
227