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 >
11
11
</term >
12
12
<listitem >
13
13
<simpara >
14
- By default all statements are executed in
15
- <link linkend =" mysqlinfo.concepts.buffering" >buffered mode</link >.
16
- If this attribute is set to &false; on a
17
- <classname >PDO</classname > object, the MySQL driver will use the
18
- unbuffered mode.
14
+ &Alias; <constant >Pdo\Mysql::ATTR_USE_BUFFERED_QUERY</constant >
19
15
</simpara >
20
- <para >
21
- <example ><title >Setting MySQL unbuffered mode</title >
22
- <programlisting role =" php" >
23
- <![CDATA[
24
- <?php
25
- $pdo = new PDO("mysql:host=localhost;dbname=world", 'my_user', 'my_password');
26
- $pdo->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false);
27
-
28
- $unbufferedResult = $pdo->query("SELECT Name FROM City");
29
- foreach ($unbufferedResult as $row) {
30
- echo $row['Name'] . PHP_EOL;
31
- }
32
- ?>
33
- ]]>
34
- </programlisting >
35
- </example >
36
- </para >
37
16
</listitem >
38
17
</varlistentry >
39
18
<varlistentry xml : id =" pdo.constants.mysql-attr-local-infile" >
@@ -42,45 +21,32 @@ foreach ($unbufferedResult as $row) {
42
21
(<type >int</type >)
43
22
</term >
44
23
<listitem >
45
- <para >
46
- Enable <literal >LOAD LOCAL INFILE</literal >.
47
- </para >
48
- <para >
49
- Note, this constant can only be used in the <parameter >driver_options</parameter >
50
- array when constructing a new database handle.
51
- </para >
24
+ <simpara >
25
+ &Alias; <constant >Pdo\Mysql::ATTR_LOCAL_INFILE</constant >
26
+ </simpara >
52
27
</listitem >
53
28
</varlistentry >
54
29
<varlistentry xml : id =" pdo.constants.mysql-attr-local-infile-directory" >
55
30
<term >
56
31
<constant >PDO::MYSQL_ATTR_LOCAL_INFILE_DIRECTORY</constant >
57
- (<type >string </type >)
32
+ (<type >int </type >)
58
33
</term >
59
34
<listitem >
60
- <para >
61
- Allows restricting LOCAL DATA loading to files located in this designated
62
- directory. Available as of PHP 8.1.0.
63
- </para >
64
- <para >
65
- Note, this constant can only be used in the <parameter >driver_options</parameter >
66
- array when constructing a new database handle.
67
- </para >
35
+ <simpara >
36
+ &Alias; <constant >Pdo\Mysql::ATTR_LOCAL_INFILE_DIRECTORY</constant >.
37
+ Available as of PHP 8.1.0.
38
+ </simpara >
68
39
</listitem >
69
40
</varlistentry >
70
41
<varlistentry xml : id =" pdo.constants.mysql-attr-init-command" >
71
42
<term >
72
43
<constant >PDO::MYSQL_ATTR_INIT_COMMAND</constant >
73
- (<type >string </type >)
44
+ (<type >int </type >)
74
45
</term >
75
46
<listitem >
76
- <para >
77
- Command to execute when connecting to the MySQL server. Will
78
- automatically be re-executed when reconnecting.
79
- </para >
80
- <para >
81
- Note, this constant can only be used in the <parameter >driver_options</parameter >
82
- array when constructing a new database handle.
83
- </para >
47
+ <simpara >
48
+ &Alias; <constant >Pdo\Mysql::ATTR_INIT_COMMAND</constant >
49
+ </simpara >
84
50
</listitem >
85
51
</varlistentry >
86
52
<varlistentry xml : id =" pdo.constants.mysql-attr-read-default-file" >
@@ -89,12 +55,9 @@ foreach ($unbufferedResult as $row) {
89
55
(<type >int</type >)
90
56
</term >
91
57
<listitem >
92
- <para >
93
- Read options from the named option file instead of from
94
- <filename >my.cnf</filename >. This option is not available if
95
- mysqlnd is used, because mysqlnd does not read the mysql
96
- configuration files.
97
- </para >
58
+ <simpara >
59
+ &Alias; <constant >Pdo\Mysql::ATTR_READ_DEFAULT_FILE</constant >
60
+ </simpara >
98
61
</listitem >
99
62
</varlistentry >
100
63
<varlistentry xml : id =" pdo.constants.mysql-attr-read-default-group" >
@@ -103,12 +66,9 @@ foreach ($unbufferedResult as $row) {
103
66
(<type >int</type >)
104
67
</term >
105
68
<listitem >
106
- <para >
107
- Read options from the named group from <filename >my.cnf</filename > or the
108
- file specified with <constant >MYSQL_READ_DEFAULT_FILE</constant >. This option
109
- is not available if mysqlnd is used, because mysqlnd does not read the mysql
110
- configuration files.
111
- </para >
69
+ <simpara >
70
+ &Alias; <constant >Pdo\Mysql::ATTR_READ_DEFAULT_GROUP</constant >
71
+ </simpara >
112
72
</listitem >
113
73
</varlistentry >
114
74
<varlistentry xml : id =" pdo.constants.mysql-attr-max-buffer-size" >
@@ -117,10 +77,9 @@ foreach ($unbufferedResult as $row) {
117
77
(<type >int</type >)
118
78
</term >
119
79
<listitem >
120
- <para >
121
- Maximum buffer size. Defaults to 1 MiB. This constant is not supported when
122
- compiled against mysqlnd.
123
- </para >
80
+ <simpara >
81
+ &Alias; <constant >Pdo\Mysql::ATTR_MAX_BUFFER_SIZE</constant >
82
+ </simpara >
124
83
</listitem >
125
84
</varlistentry >
126
85
<varlistentry xml : id =" pdo.constants.mysql-attr-direct-query" >
@@ -129,9 +88,9 @@ foreach ($unbufferedResult as $row) {
129
88
(<type >int</type >)
130
89
</term >
131
90
<listitem >
132
- <para >
133
- Perform direct queries, don't use prepared statements.
134
- </para >
91
+ <simpara >
92
+ &Alias; < constant >PDO::ATTR_EMULATE_PREPARES</ constant >
93
+ </simpara >
135
94
</listitem >
136
95
</varlistentry >
137
96
<varlistentry xml : id =" pdo.constants.mysql-attr-found-rows" >
@@ -140,10 +99,9 @@ foreach ($unbufferedResult as $row) {
140
99
(<type >int</type >)
141
100
</term >
142
101
<listitem >
143
- <para >
144
- Return the number of found (matched) rows, not the
145
- number of changed rows.
146
- </para >
102
+ <simpara >
103
+ &Alias; <constant >Pdo\Mysql::ATTR_FOUND_ROWS</constant >
104
+ </simpara >
147
105
</listitem >
148
106
</varlistentry >
149
107
<varlistentry xml : id =" pdo.constants.mysql-attr-ignore-space" >
@@ -152,10 +110,9 @@ foreach ($unbufferedResult as $row) {
152
110
(<type >int</type >)
153
111
</term >
154
112
<listitem >
155
- <para >
156
- Permit spaces after function names. Makes all functions
157
- names reserved words.
158
- </para >
113
+ <simpara >
114
+ &Alias; <constant >Pdo\Mysql::ATTR_IGNORE_SPACE</constant >
115
+ </simpara >
159
116
</listitem >
160
117
</varlistentry >
161
118
<varlistentry xml : id =" pdo.constants.mysql-attr-compress" >
@@ -164,9 +121,21 @@ foreach ($unbufferedResult as $row) {
164
121
(<type >int</type >)
165
122
</term >
166
123
<listitem >
167
- <para >
168
- Enable network communication compression.
169
- </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 >
170
139
</listitem >
171
140
</varlistentry >
172
141
@@ -176,9 +145,9 @@ foreach ($unbufferedResult as $row) {
176
145
(<type >int</type >)
177
146
</term >
178
147
<listitem >
179
- <para >
180
- The file path to the SSL certificate authority.
181
- </para >
148
+ <simpara >
149
+ &Alias; < constant >Pdo\Mysql::ATTR_SSL_CA</ constant >
150
+ </simpara >
182
151
</listitem >
183
152
</varlistentry >
184
153
@@ -188,10 +157,9 @@ foreach ($unbufferedResult as $row) {
188
157
(<type >int</type >)
189
158
</term >
190
159
<listitem >
191
- <para >
192
- The file path to the directory that contains the trusted SSL
193
- CA certificates, which are stored in <acronym >PEM</acronym > format.
194
- </para >
160
+ <simpara >
161
+ &Alias; <constant >Pdo\Mysql::ATTR_SSL_CAPATH</constant >
162
+ </simpara >
195
163
</listitem >
196
164
</varlistentry >
197
165
@@ -201,9 +169,9 @@ foreach ($unbufferedResult as $row) {
201
169
(<type >int</type >)
202
170
</term >
203
171
<listitem >
204
- <para >
205
- The file path to the SSL certificate.
206
- </para >
172
+ <simpara >
173
+ &Alias; < constant >Pdo\Mysql::ATTR_SSL_CERT</ constant >
174
+ </simpara >
207
175
</listitem >
208
176
</varlistentry >
209
177
@@ -213,10 +181,9 @@ foreach ($unbufferedResult as $row) {
213
181
(<type >int</type >)
214
182
</term >
215
183
<listitem >
216
- <para >
217
- A list of one or more permissible ciphers to use for SSL encryption, in a format
218
- understood by OpenSSL. For example: <literal >DHE-RSA-AES256-SHA:AES128-SHA</literal >
219
- </para >
184
+ <simpara >
185
+ &Alias; <constant >Pdo\Mysql::ATTR_SSL_CIPHER</constant >
186
+ </simpara >
220
187
</listitem >
221
188
</varlistentry >
222
189
@@ -226,9 +193,9 @@ foreach ($unbufferedResult as $row) {
226
193
(<type >int</type >)
227
194
</term >
228
195
<listitem >
229
- <para >
230
- The file path to the SSL key.
231
- </para >
196
+ <simpara >
197
+ &Alias; < constant >Pdo\Mysql::ATTR_SSL_KEY</ constant >
198
+ </simpara >
232
199
</listitem >
233
200
</varlistentry >
234
201
@@ -238,13 +205,9 @@ foreach ($unbufferedResult as $row) {
238
205
(<type >int</type >)
239
206
</term >
240
207
<listitem >
241
- <para >
242
- Provides a way to disable verification of the server SSL certificate.
243
- This option is available only with mysqlnd.
244
- </para >
245
- <para >
246
- &version.exists.asof; 7.0.18 and PHP 7.1.4.
247
- </para >
208
+ <simpara >
209
+ &Alias; <constant >Pdo\Mysql::ATTR_SSL_VERIFY_SERVER_CERT</constant >
210
+ </simpara >
248
211
</listitem >
249
212
</varlistentry >
250
213
@@ -254,14 +217,9 @@ foreach ($unbufferedResult as $row) {
254
217
(<type >int</type >)
255
218
</term >
256
219
<listitem >
257
- <para >
258
- Disables multi query execution in both <function >PDO::prepare</function >
259
- and <function >PDO::query</function > when set to &false; .
260
- </para >
261
- <para >
262
- Note, this constant can only be used in the <parameter >driver_options</parameter >
263
- array when constructing a new database handle.
264
- </para >
220
+ <simpara >
221
+ &Alias; <constant >Pdo\Mysql::ATTR_MULTI_STATEMENTS</constant >
222
+ </simpara >
265
223
</listitem >
266
224
</varlistentry >
267
225
0 commit comments