2004-11-10 22:21:24 +00:00
|
|
|
<?xml version='1.0' encoding='iso-8859-1'?>
|
2005-11-25 14:17:45 +00:00
|
|
|
<!-- $Revision: 1.7 $ -->
|
2004-11-10 22:21:24 +00:00
|
|
|
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
|
|
|
<refentry id="function.PDO-setAttribute">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>PDO::setAttribute</refname>
|
|
|
|
<refpurpose>
|
|
|
|
Set an attribute
|
|
|
|
</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<methodsynopsis>
|
|
|
|
<type>bool</type><methodname>PDO::setAttribute</methodname>
|
|
|
|
<methodparam><type>int</type><parameter>attribute</parameter></methodparam>
|
|
|
|
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
|
|
|
|
</methodsynopsis>
|
|
|
|
|
|
|
|
<para>
|
2005-07-11 04:38:55 +00:00
|
|
|
Sets an attribute on the database handle. Some of the available generic
|
|
|
|
attributes are listed below; some drivers may make use of
|
|
|
|
additional driver specific attributes.
|
2004-11-10 22:21:24 +00:00
|
|
|
<itemizedlist>
|
|
|
|
<listitem><para>
|
2005-09-20 08:22:29 +00:00
|
|
|
<literal>PDO::ATTR_CASE</literal>: Force column names to a specific case.
|
2004-11-10 22:21:24 +00:00
|
|
|
<itemizedlist>
|
2004-11-16 20:12:45 +00:00
|
|
|
<listitem><para>
|
2005-09-20 08:22:29 +00:00
|
|
|
<literal>PDO::CASE_LOWER</literal>: Force column names to lower case.
|
2004-11-16 20:12:45 +00:00
|
|
|
</para></listitem>
|
|
|
|
<listitem><para>
|
2005-09-20 08:22:29 +00:00
|
|
|
<literal>PDO::CASE_NATURAL</literal>: Leave column names as returned by
|
2004-11-16 20:12:45 +00:00
|
|
|
the database driver.
|
|
|
|
</para></listitem>
|
|
|
|
<listitem><para>
|
2005-09-20 08:22:29 +00:00
|
|
|
<literal>PDO::CASE_UPPER</literal>: Force column names to upper case.
|
2004-11-16 20:12:45 +00:00
|
|
|
</para></listitem>
|
2004-11-10 22:21:24 +00:00
|
|
|
</itemizedlist>
|
|
|
|
</para></listitem>
|
2005-11-02 09:47:10 +00:00
|
|
|
<listitem><para><literal>PDO::ATTR_ERRMODE</literal>: Error reporting.
|
|
|
|
<itemizedlist>
|
|
|
|
<listitem><para><literal>PDO::ERRMODE_SILENT</literal>:
|
|
|
|
Just set error codes.</para></listitem>
|
|
|
|
<listitem><para><literal>PDO::ERRMODE_WARNING</literal>:
|
|
|
|
Raise <link linkend="e-warning">E_WARNING</link>.</para></listitem>
|
|
|
|
<listitem><para><literal>PDO::ERRMODE_EXCEPTION</literal>:
|
|
|
|
Throw <link linkend="language.exceptions">exceptions</link>.</para></listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
</para></listitem>
|
|
|
|
<listitem><para><literal>PDO::ATTR_ORACLE_NULLS</literal>
|
|
|
|
(available with all drivers, not just Oracle):
|
|
|
|
Conversion of NULL and empty strings.
|
|
|
|
<itemizedlist>
|
|
|
|
<listitem><para><literal>PDO::NULL_NATURAL</literal>:
|
|
|
|
No conversion.</para></listitem>
|
|
|
|
<listitem><para><literal>PDO::NULL_EMPTY_STRING</literal>:
|
|
|
|
Empty string is converted to &null;.</para></listitem>
|
|
|
|
<listitem><para><literal>PDO::NULL_TO_STRING</literal>:
|
|
|
|
NULL is converted to an empty string.</para></listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
</para></listitem>
|
|
|
|
<listitem><para><literal>PDO::ATTR_STRINGIFY_FETCHES</literal>:
|
|
|
|
Convert numeric values to strings when fetching.
|
|
|
|
Requires <type>bool</type>.
|
|
|
|
</para></listitem>
|
|
|
|
<listitem><para><literal>PDO::ATTR_STATEMENT_CLASS</literal>:
|
|
|
|
Set user-supplied statement class derived from PDOStatement.
|
|
|
|
Cannot be used with persistent PDO instances.
|
2005-11-25 14:17:45 +00:00
|
|
|
Requires <literal>array(string classname, array(mixed constructor_args))</literal>.
|
2005-11-02 09:47:10 +00:00
|
|
|
</para></listitem>
|
|
|
|
<listitem><para><literal>PDO::ATTR_AUTOCOMMIT</literal>
|
|
|
|
(available in OCI, Firebird and MySQL):
|
|
|
|
Whether to autocommit every single statement.
|
|
|
|
</para></listitem>
|
|
|
|
<listitem><para><literal>PDO::MYSQL_ATTR_USE_BUFFERED_QUERY</literal>
|
|
|
|
(available in MySQL):
|
|
|
|
Use buffered queries.
|
|
|
|
</para></listitem>
|
2004-11-10 22:21:24 +00:00
|
|
|
</itemizedlist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
|
|
|
|
<!-- 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:"../../../../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
|
|
|
|
-->
|