php-doc-en/reference/pdo_mysql/constants.xml
2016-05-08 20:39:30 +00:00

275 lines
7.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<section xml:id="pdo-mysql.constants" xmlns="http://docbook.org/ns/docbook">
&reftitle.constants;
&pdo.driver-constants;
<variablelist>
<varlistentry xml:id="pdo.constants.mysql-attr-use-buffered-query">
<term>
<constant>PDO::MYSQL_ATTR_USE_BUFFERED_QUERY</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
If this attribute is set to &true; on a
<classname>PDOStatement</classname>, the MySQL driver will use the
buffered versions of the MySQL API. If you're writing portable code, you
should use <function>PDOStatement::fetchAll</function> instead.
</simpara>
<para>
<example><title>Forcing queries to be buffered in mysql</title>
<programlisting role="php">
<![CDATA[
<?php
if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') {
$stmt = $db->prepare('select * from foo',
array(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true));
} else {
die("my application only works with mysql; I should use \$stmt->fetchAll() instead");
}
?>
]]>
</programlisting>
</example>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="pdo.constants.mysql-attr-local-infile">
<term>
<constant>PDO::MYSQL_ATTR_LOCAL_INFILE</constant>
(<type>integer</type>)
</term>
<listitem>
<para>
Enable <literal>LOAD LOCAL INFILE</literal>.
</para>
<para>
Note, this constant can only be used in the <parameter>driver_options</parameter>
array when constructing a new database handle.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="pdo.constants.mysql-attr-init-command">
<term>
<constant>PDO::MYSQL_ATTR_INIT_COMMAND</constant>
(<type>integer</type>)
</term>
<listitem>
<para>
Command to execute when connecting to the MySQL server. Will
automatically be re-executed when reconnecting.
</para>
<para>
Note, this constant can only be used in the <parameter>driver_options</parameter>
array when constructing a new database handle.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="pdo.constants.mysql-attr-read-default-file">
<term>
<constant>PDO::MYSQL_ATTR_READ_DEFAULT_FILE</constant>
(<type>integer</type>)
</term>
<listitem>
<para>
Read options from the named option file instead of from
<filename>my.cnf</filename>. This option is not available if
mysqlnd is used, because mysqlnd does not read the mysql
configuration files.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="pdo.constants.mysql-attr-read-default-group">
<term>
<constant>PDO::MYSQL_ATTR_READ_DEFAULT_GROUP</constant>
(<type>integer</type>)
</term>
<listitem>
<para>
Read options from the named group from <filename>my.cnf</filename> or the
file specified with <constant>MYSQL_READ_DEFAULT_FILE</constant>. This option
is not available if mysqlnd is used, because mysqlnd does not read the mysql
configuration files.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="pdo.constants.mysql-attr-max-buffer-size">
<term>
<constant>PDO::MYSQL_ATTR_MAX_BUFFER_SIZE</constant>
(<type>integer</type>)
</term>
<listitem>
<para>
Maximum buffer size. Defaults to 1 MiB. This constant is not supported when
compiled against mysqlnd.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="pdo.constants.mysql-attr-direct-query">
<term>
<constant>PDO::MYSQL_ATTR_DIRECT_QUERY</constant>
(<type>integer</type>)
</term>
<listitem>
<para>
Perform direct queries, don't use prepared statements.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="pdo.constants.mysql-attr-found-rows">
<term>
<constant>PDO::MYSQL_ATTR_FOUND_ROWS</constant>
(<type>integer</type>)
</term>
<listitem>
<para>
Return the number of found (matched) rows, not the
number of changed rows.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="pdo.constants.mysql-attr-ignore-space">
<term>
<constant>PDO::MYSQL_ATTR_IGNORE_SPACE</constant>
(<type>integer</type>)
</term>
<listitem>
<para>
Permit spaces after function names. Makes all functions
names reserved words.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="pdo.constants.mysql-attr-compress">
<term>
<constant>PDO::MYSQL_ATTR_COMPRESS</constant>
(<type>integer</type>)
</term>
<listitem>
<para>
Enable network communication compression. This is also supported when
compiled against mysqlnd as of PHP 5.3.11.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="pdo.constants.mysql-attr-ssl-ca">
<term>
<constant>PDO::MYSQL_ATTR_SSL_CA</constant>
(<type>integer</type>)
</term>
<listitem>
<para>
The file path to the SSL certificate authority.
</para>
<para>
&version.exists.asof; 5.3.7.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="pdo.constants.mysql-attr-ssl-capath">
<term>
<constant>PDO::MYSQL_ATTR_SSL_CAPATH</constant>
(<type>integer</type>)
</term>
<listitem>
<para>
The file path to the directory that contains the trusted SSL
CA certificates, which are stored in PEM format.
</para>
<para>
&version.exists.asof; 5.3.7.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="pdo.constants.mysql-attr-ssl-cert">
<term>
<constant>PDO::MYSQL_ATTR_SSL_CERT</constant>
(<type>integer</type>)
</term>
<listitem>
<para>
The file path to the SSL certificate.
</para>
<para>
&version.exists.asof; 5.3.7.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="pdo.constants.mysql-attr-cipher">
<term>
<constant>PDO::MYSQL_ATTR_SSL_CIPHER</constant>
(<type>integer</type>)
</term>
<listitem>
<para>
A list of one or more permissible ciphers to use for SSL encryption, in a format
understood by OpenSSL. For example: <literal>DHE-RSA-AES256-SHA:AES128-SHA</literal>
</para>
<para>
&version.exists.asof; 5.3.7.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="pdo.constants.mysql-attr-key">
<term>
<constant>PDO::MYSQL_ATTR_SSL_KEY</constant>
(<type>integer</type>)
</term>
<listitem>
<para>
The file path to the SSL key.
</para>
<para>
&version.exists.asof; 5.3.7.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="pdo.constants.mysql-attr-multi-statements">
<term>
<constant>PDO::MYSQL_ATTR_MULTI_STATEMENTS</constant>
(<type>integer</type>)
</term>
<listitem>
<para>
Disables multi query execution in both <function>PDO::prepare</function>
and <function>PDO::query</function> when set to &false;.
</para>
<para>
Note, this constant can only be used in the <parameter>driver_options</parameter>
array when constructing a new database handle.
</para>
<para>
&version.exists.asof; 5.5.21 and PHP 5.6.5.
</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->