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,13 +21,9 @@ 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" >
@@ -57,14 +32,9 @@ foreach ($unbufferedResult as $row) {
57
32
(<type >string</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
+ </simpara >
68
38
</listitem >
69
39
</varlistentry >
70
40
<varlistentry xml : id =" pdo.constants.mysql-attr-init-command" >
@@ -73,14 +43,9 @@ foreach ($unbufferedResult as $row) {
73
43
(<type >string</type >)
74
44
</term >
75
45
<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 >
46
+ <simpara >
47
+ &Alias; <constant >Pdo\Mysql::ATTR_INIT_COMMAND</constant >
48
+ </simpara >
84
49
</listitem >
85
50
</varlistentry >
86
51
<varlistentry xml : id =" pdo.constants.mysql-attr-read-default-file" >
@@ -89,12 +54,9 @@ foreach ($unbufferedResult as $row) {
89
54
(<type >int</type >)
90
55
</term >
91
56
<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 >
57
+ <simpara >
58
+ &Alias; <constant >Pdo\Mysql::ATTR_READ_DEFAULT_FILE</constant >
59
+ </simpara >
98
60
</listitem >
99
61
</varlistentry >
100
62
<varlistentry xml : id =" pdo.constants.mysql-attr-read-default-group" >
@@ -103,12 +65,9 @@ foreach ($unbufferedResult as $row) {
103
65
(<type >int</type >)
104
66
</term >
105
67
<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 >
68
+ <simpara >
69
+ &Alias; <constant >Pdo\Mysql::ATTR_READ_DEFAULT_GROUP</constant >
70
+ </simpara >
112
71
</listitem >
113
72
</varlistentry >
114
73
<varlistentry xml : id =" pdo.constants.mysql-attr-max-buffer-size" >
@@ -117,10 +76,9 @@ foreach ($unbufferedResult as $row) {
117
76
(<type >int</type >)
118
77
</term >
119
78
<listitem >
120
- <para >
121
- Maximum buffer size. Defaults to 1 MiB. This constant is not supported when
122
- compiled against mysqlnd.
123
- </para >
79
+ <simpara >
80
+ &Alias; <constant >Pdo\Mysql::ATTR_MAX_BUFFER_SIZE</constant >
81
+ </simpara >
124
82
</listitem >
125
83
</varlistentry >
126
84
<varlistentry xml : id =" pdo.constants.mysql-attr-direct-query" >
@@ -129,9 +87,9 @@ foreach ($unbufferedResult as $row) {
129
87
(<type >int</type >)
130
88
</term >
131
89
<listitem >
132
- <para >
133
- Perform direct queries, don't use prepared statements.
134
- </para >
90
+ <simpara >
91
+ &Alias; < constant >Pdo\Mysql::ATTR_DIRECT_QUERY</ constant >
92
+ </simpara >
135
93
</listitem >
136
94
</varlistentry >
137
95
<varlistentry xml : id =" pdo.constants.mysql-attr-found-rows" >
@@ -140,10 +98,9 @@ foreach ($unbufferedResult as $row) {
140
98
(<type >int</type >)
141
99
</term >
142
100
<listitem >
143
- <para >
144
- Return the number of found (matched) rows, not the
145
- number of changed rows.
146
- </para >
101
+ <simpara >
102
+ &Alias; <constant >Pdo\Mysql::ATTR_FOUND_ROWS</constant >
103
+ </simpara >
147
104
</listitem >
148
105
</varlistentry >
149
106
<varlistentry xml : id =" pdo.constants.mysql-attr-ignore-space" >
@@ -152,10 +109,9 @@ foreach ($unbufferedResult as $row) {
152
109
(<type >int</type >)
153
110
</term >
154
111
<listitem >
155
- <para >
156
- Permit spaces after function names. Makes all functions
157
- names reserved words.
158
- </para >
112
+ <simpara >
113
+ &Alias; <constant >Pdo\Mysql::ATTR_IGNORE_SPACE</constant >
114
+ </simpara >
159
115
</listitem >
160
116
</varlistentry >
161
117
<varlistentry xml : id =" pdo.constants.mysql-attr-compress" >
@@ -164,9 +120,9 @@ foreach ($unbufferedResult as $row) {
164
120
(<type >int</type >)
165
121
</term >
166
122
<listitem >
167
- <para >
168
- Enable network communication compression.
169
- </para >
123
+ <simpara >
124
+ &Alias; < constant >Pdo\Mysql::ATTR_COMPRESS</ constant >
125
+ </simpara >
170
126
</listitem >
171
127
</varlistentry >
172
128
@@ -176,9 +132,9 @@ foreach ($unbufferedResult as $row) {
176
132
(<type >int</type >)
177
133
</term >
178
134
<listitem >
179
- <para >
180
- The file path to the SSL certificate authority.
181
- </para >
135
+ <simpara >
136
+ &Alias; < constant >Pdo\Mysql::ATTR_SSL_CA</ constant >
137
+ </simpara >
182
138
</listitem >
183
139
</varlistentry >
184
140
@@ -188,10 +144,9 @@ foreach ($unbufferedResult as $row) {
188
144
(<type >int</type >)
189
145
</term >
190
146
<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 >
147
+ <simpara >
148
+ &Alias; <constant >Pdo\Mysql::ATTR_SSL_CAPATH</constant >
149
+ </simpara >
195
150
</listitem >
196
151
</varlistentry >
197
152
@@ -201,9 +156,9 @@ foreach ($unbufferedResult as $row) {
201
156
(<type >int</type >)
202
157
</term >
203
158
<listitem >
204
- <para >
205
- The file path to the SSL certificate.
206
- </para >
159
+ <simpara >
160
+ &Alias; < constant >Pdo\Mysql::ATTR_SSL_CERT</ constant >
161
+ </simpara >
207
162
</listitem >
208
163
</varlistentry >
209
164
@@ -213,10 +168,9 @@ foreach ($unbufferedResult as $row) {
213
168
(<type >int</type >)
214
169
</term >
215
170
<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 >
171
+ <simpara >
172
+ &Alias; <constant >Pdo\Mysql::ATTR_SSL_CIPHER</constant >
173
+ </simpara >
220
174
</listitem >
221
175
</varlistentry >
222
176
@@ -226,9 +180,9 @@ foreach ($unbufferedResult as $row) {
226
180
(<type >int</type >)
227
181
</term >
228
182
<listitem >
229
- <para >
230
- The file path to the SSL key.
231
- </para >
183
+ <simpara >
184
+ &Alias; < constant >Pdo\Mysql::ATTR_SSL_KEY</ constant >
185
+ </simpara >
232
186
</listitem >
233
187
</varlistentry >
234
188
@@ -238,13 +192,9 @@ foreach ($unbufferedResult as $row) {
238
192
(<type >int</type >)
239
193
</term >
240
194
<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 >
195
+ <simpara >
196
+ &Alias; <constant >Pdo\Mysql::ATTR_SSL_VERIFY_SERVER_CERT</constant >
197
+ </simpara >
248
198
</listitem >
249
199
</varlistentry >
250
200
@@ -254,14 +204,9 @@ foreach ($unbufferedResult as $row) {
254
204
(<type >int</type >)
255
205
</term >
256
206
<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 >
207
+ <simpara >
208
+ &Alias; <constant >Pdo\Mysql::ATTR_MULTI_STATEMENTS</constant >
209
+ </simpara >
265
210
</listitem >
266
211
</varlistentry >
267
212
0 commit comments