2014-09-05 07:44:07 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2009-07-11 08:37:21 +00:00
|
|
|
<!-- $Revision$ -->
|
2007-06-20 22:25:43 +00:00
|
|
|
<section xml:id="pdo-mysql.constants" xmlns="http://docbook.org/ns/docbook">
|
2005-09-15 20:57:51 +00:00
|
|
|
&reftitle.constants;
|
2005-09-16 17:36:09 +00:00
|
|
|
&pdo.driver-constants;
|
2005-09-15 20:57:51 +00:00
|
|
|
<variablelist>
|
2012-02-28 13:22:09 +00:00
|
|
|
<varlistentry xml:id="pdo.constants.mysql-attr-use-buffered-query">
|
2005-09-15 20:57:51 +00:00
|
|
|
<term>
|
2006-03-30 14:33:55 +00:00
|
|
|
<constant>PDO::MYSQL_ATTR_USE_BUFFERED_QUERY</constant>
|
2005-09-15 20:57:51 +00:00
|
|
|
(<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>
|
2011-09-30 14:21:51 +00:00
|
|
|
<programlisting role="php">
|
2005-09-15 20:57:51 +00:00
|
|
|
<![CDATA[
|
|
|
|
<?php
|
2006-05-21 09:47:05 +00:00
|
|
|
if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') {
|
2005-11-18 16:25:23 +00:00
|
|
|
$stmt = $db->prepare('select * from foo',
|
2006-04-04 17:13:02 +00:00
|
|
|
array(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true));
|
2005-09-15 20:57:51 +00:00
|
|
|
} else {
|
2005-11-18 16:25:23 +00:00
|
|
|
die("my application only works with mysql; I should use \$stmt->fetchAll() instead");
|
2005-09-15 20:57:51 +00:00
|
|
|
}
|
2005-11-18 16:25:23 +00:00
|
|
|
?>
|
2005-09-15 20:57:51 +00:00
|
|
|
]]>
|
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2012-02-28 13:22:09 +00:00
|
|
|
<varlistentry xml:id="pdo.constants.mysql-attr-local-infile">
|
2006-04-03 12:48:33 +00:00
|
|
|
<term>
|
|
|
|
<constant>PDO::MYSQL_ATTR_LOCAL_INFILE</constant>
|
|
|
|
(<type>integer</type>)
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Enable <literal>LOAD LOCAL INFILE</literal>.
|
|
|
|
</para>
|
2010-10-23 12:50:27 +00:00
|
|
|
<para>
|
|
|
|
Note, this constant can only be used in the <parameter>driver_options</parameter>
|
|
|
|
array when constructing a new database handle.
|
|
|
|
</para>
|
2006-04-03 12:48:33 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2012-02-28 13:22:09 +00:00
|
|
|
<varlistentry xml:id="pdo.constants.mysql-attr-init-command">
|
2006-04-03 12:48:33 +00:00
|
|
|
<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>
|
2010-10-23 12:50:27 +00:00
|
|
|
<para>
|
|
|
|
Note, this constant can only be used in the <parameter>driver_options</parameter>
|
|
|
|
array when constructing a new database handle.
|
|
|
|
</para>
|
2006-04-03 12:48:33 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2012-02-28 13:22:09 +00:00
|
|
|
<varlistentry xml:id="pdo.constants.mysql-attr-read-default-file">
|
2006-04-03 12:48:33 +00:00
|
|
|
<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
|
2009-12-23 16:47:12 +00:00
|
|
|
<filename>my.cnf</filename>. This option is not available if
|
|
|
|
mysqlnd is used, because mysqlnd does not read the mysql
|
|
|
|
configuration files.
|
2006-04-03 12:48:33 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2012-02-28 13:22:09 +00:00
|
|
|
<varlistentry xml:id="pdo.constants.mysql-attr-read-default-group">
|
2006-04-03 12:48:33 +00:00
|
|
|
<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
|
2009-12-23 16:47:12 +00:00
|
|
|
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.
|
2006-04-03 12:48:33 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2012-02-28 13:22:09 +00:00
|
|
|
<varlistentry xml:id="pdo.constants.mysql-attr-max-buffer-size">
|
2006-04-03 12:48:33 +00:00
|
|
|
<term>
|
|
|
|
<constant>PDO::MYSQL_ATTR_MAX_BUFFER_SIZE</constant>
|
|
|
|
(<type>integer</type>)
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2010-10-20 07:24:37 +00:00
|
|
|
Maximum buffer size. Defaults to 1 MiB. This constant is not supported when
|
|
|
|
compiled against mysqlnd.
|
2006-04-03 12:48:33 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2012-02-28 13:22:09 +00:00
|
|
|
<varlistentry xml:id="pdo.constants.mysql-attr-direct-query">
|
2006-04-03 12:48:33 +00:00
|
|
|
<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>
|
2012-02-28 13:22:09 +00:00
|
|
|
<varlistentry xml:id="pdo.constants.mysql-attr-found-rows">
|
2010-10-20 07:24:37 +00:00
|
|
|
<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>
|
2012-02-28 13:22:09 +00:00
|
|
|
<varlistentry xml:id="pdo.constants.mysql-attr-ignore-space">
|
2010-10-20 07:24:37 +00:00
|
|
|
<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>
|
2012-02-28 13:22:09 +00:00
|
|
|
<varlistentry xml:id="pdo.constants.mysql-attr-compress">
|
2010-10-20 07:24:37 +00:00
|
|
|
<term>
|
|
|
|
<constant>PDO::MYSQL_ATTR_COMPRESS</constant>
|
|
|
|
(<type>integer</type>)
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2015-09-08 13:32:13 +00:00
|
|
|
Enable network communication compression. This is also supported when
|
|
|
|
compiled against mysqlnd as of PHP 5.3.11.
|
2010-10-20 07:24:37 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2012-02-22 22:40:46 +00:00
|
|
|
|
2012-02-28 13:22:09 +00:00
|
|
|
<varlistentry xml:id="pdo.constants.mysql-attr-ssl-ca">
|
2012-02-22 22:40:46 +00:00
|
|
|
<term>
|
|
|
|
<constant>PDO::MYSQL_ATTR_SSL_CA</constant>
|
|
|
|
(<type>integer</type>)
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2012-02-28 03:48:25 +00:00
|
|
|
The file path to the SSL certificate authority.
|
2012-02-22 22:40:46 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
&version.exists.asof; 5.3.7.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2012-02-28 13:22:09 +00:00
|
|
|
<varlistentry xml:id="pdo.constants.mysql-attr-ssl-capath">
|
2012-02-22 22:40:46 +00:00
|
|
|
<term>
|
|
|
|
<constant>PDO::MYSQL_ATTR_SSL_CAPATH</constant>
|
|
|
|
(<type>integer</type>)
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2012-02-28 03:48:25 +00:00
|
|
|
The file path to the directory that contains the trusted SSL
|
|
|
|
CA certificates, which are stored in PEM format.
|
2012-02-22 22:40:46 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
&version.exists.asof; 5.3.7.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2012-02-28 13:22:09 +00:00
|
|
|
<varlistentry xml:id="pdo.constants.mysql-attr-ssl-cert">
|
2012-02-22 22:40:46 +00:00
|
|
|
<term>
|
|
|
|
<constant>PDO::MYSQL_ATTR_SSL_CERT</constant>
|
|
|
|
(<type>integer</type>)
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2012-02-28 03:48:25 +00:00
|
|
|
The file path to the SSL certificate.
|
2012-02-22 22:40:46 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
&version.exists.asof; 5.3.7.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2012-02-28 13:22:09 +00:00
|
|
|
<varlistentry xml:id="pdo.constants.mysql-attr-cipher">
|
2012-02-22 22:40:46 +00:00
|
|
|
<term>
|
2013-02-16 12:26:01 +00:00
|
|
|
<constant>PDO::MYSQL_ATTR_SSL_CIPHER</constant>
|
2012-02-22 22:40:46 +00:00
|
|
|
(<type>integer</type>)
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2012-02-28 03:48:25 +00:00
|
|
|
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>
|
2012-02-22 22:40:46 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
&version.exists.asof; 5.3.7.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2012-02-28 13:22:09 +00:00
|
|
|
<varlistentry xml:id="pdo.constants.mysql-attr-key">
|
2012-02-22 22:40:46 +00:00
|
|
|
<term>
|
2013-02-16 12:26:01 +00:00
|
|
|
<constant>PDO::MYSQL_ATTR_SSL_KEY</constant>
|
2012-02-22 22:40:46 +00:00
|
|
|
(<type>integer</type>)
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2012-02-28 03:48:25 +00:00
|
|
|
The file path to the SSL key.
|
2012-02-22 22:40:46 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
&version.exists.asof; 5.3.7.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2016-05-08 20:39:30 +00:00
|
|
|
<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>
|
|
|
|
|
2005-09-15 20:57:51 +00:00
|
|
|
</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
|
2009-09-25 07:04:39 +00:00
|
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
2005-09-15 20:57:51 +00:00
|
|
|
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
|
|
|
|
-->
|