mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Switched to new xml_proto.php file structure
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@172464 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
167842e95c
commit
f1919f2714
21 changed files with 1597 additions and 96 deletions
426
reference/pdo/constants.xml
Normal file
426
reference/pdo/constants.xml
Normal file
|
@ -0,0 +1,426 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<section id="pdo.constants">
|
||||
&reftitle.constants;
|
||||
&extension.constants;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_PARAM_NULL</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_PARAM_INT</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_PARAM_STR</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_PARAM_LOB</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_PARAM_STMT</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_FETCH_LAZY</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_FETCH_ASSOC</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_FETCH_NUM</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_FETCH_BOTH</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_FETCH_OBJ</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_ATTR_AUTOCOMMIT</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_ATTR_SCROLL</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_ATTR_PREFETCH</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_ATTR_TIMEOUT</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_ATTR_ERRMODE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_ATTR_SERVER_VERSION</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_ATTR_CLIENT_VERSION</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_ATTR_SERVER_INFO</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_ATTR_CONNECTION_STATUS</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_ATTR_CASE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_ERRMODE_SILENT</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_ERRMODE_WARNING</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_ERRMODE_EXCEPTION</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_CASE_NATURAL</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_CASE_LOWER</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_CASE_UPPER</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_ERR_NONE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_ERR_CANT_MAP</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_ERR_SYNTAX</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_ERR_CONSTRAINT</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_ERR_NOT_FOUND</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_ERR_ALREADY_EXISTS</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_ERR_NOT_IMPLEMENTED</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_ERR_MISMATCH</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_ERR_TRUNCATED</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>PDO_ERR_DISCONNECTED</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</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:"../../../../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
|
||||
-->
|
45
reference/pdo/functions/PDO-beginTransaction.xml
Normal file
45
reference/pdo/functions/PDO-beginTransaction.xml
Normal file
|
@ -0,0 +1,45 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDO-beginTransaction">
|
||||
<refnamediv>
|
||||
<refname>PDO::beginTransaction</refname>
|
||||
<refpurpose>
|
||||
Initiates a transaction
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>PDO::beginTransaction</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
Turns off autocommit mode. Call <function>PDO::commit</function> or
|
||||
<function>PDO::rollback</function> to end the transaction and return to
|
||||
autocommit mode.
|
||||
</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
|
||||
-->
|
45
reference/pdo/functions/PDO-commit.xml
Normal file
45
reference/pdo/functions/PDO-commit.xml
Normal file
|
@ -0,0 +1,45 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDO-commit">
|
||||
<refnamediv>
|
||||
<refname>PDO::commit</refname>
|
||||
<refpurpose>
|
||||
Commits a transaction
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>PDO::commit</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
Commits a transaction, returning the database connection to autocommit
|
||||
mode until the next call to <function>PDO::beginTransaction</function>
|
||||
starts a new transaction.
|
||||
</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
|
||||
-->
|
45
reference/pdo/functions/PDO-construct.xml
Normal file
45
reference/pdo/functions/PDO-construct.xml
Normal file
|
@ -0,0 +1,45 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDO-construct">
|
||||
<refnamediv>
|
||||
<refname>PDO::__construct</refname>
|
||||
<refpurpose>
|
||||
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>object</type><methodname>PDO::__construct</methodname>
|
||||
<methodparam><type>string</type><parameter>dsn</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>username</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>passwd</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>array</type><parameter>driver_opts</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</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
|
||||
-->
|
42
reference/pdo/functions/PDO-errorCode.xml
Normal file
42
reference/pdo/functions/PDO-errorCode.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDO-errorCode">
|
||||
<refnamediv>
|
||||
<refname>PDO::errorCode</refname>
|
||||
<refpurpose>
|
||||
Fetch the error code associated with the last operation on the database handle
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>PDO::errorCode</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</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
|
||||
-->
|
42
reference/pdo/functions/PDO-errorInfo.xml
Normal file
42
reference/pdo/functions/PDO-errorInfo.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDO-errorInfo">
|
||||
<refnamediv>
|
||||
<refname>PDO::errorInfo</refname>
|
||||
<refpurpose>
|
||||
Fetch extended error information associated with the last operation on the database handle
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>PDO::errorInfo</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</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
|
||||
-->
|
42
reference/pdo/functions/PDO-exec.xml
Normal file
42
reference/pdo/functions/PDO-exec.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDO-exec">
|
||||
<refnamediv>
|
||||
<refname>PDO::exec</refname>
|
||||
<refpurpose>
|
||||
Execute a query that does not return a row set, returning the number of affected rows
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>long</type><methodname>PDO::exec</methodname>
|
||||
<methodparam><type>string</type><parameter>query</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</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
|
||||
-->
|
42
reference/pdo/functions/PDO-lastInsertId.xml
Normal file
42
reference/pdo/functions/PDO-lastInsertId.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDO-lastInsertId">
|
||||
<refnamediv>
|
||||
<refname>PDO::lastInsertId</refname>
|
||||
<refpurpose>
|
||||
Returns the number id of rows that we affected by the last call to PDO::exec(). Not always meaningful.
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>PDO::lastInsertId</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</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
|
||||
-->
|
60
reference/pdo/functions/PDO-prepare.xml
Normal file
60
reference/pdo/functions/PDO-prepare.xml
Normal file
|
@ -0,0 +1,60 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDO-prepare">
|
||||
<refnamediv>
|
||||
<refname>PDO::prepare</refname>
|
||||
<refpurpose>
|
||||
Prepares a statement for execution and returns a statement object
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>object</type><methodname>PDO::prepare</methodname>
|
||||
<methodparam><type>string</type><parameter>statement</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>options</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
Prepares an SQL statement to be executed by the statement-handle
|
||||
<function>PDO::execute</function> method. The SQL statement can contain zero
|
||||
or more named (:name) or question mark (?) parameter markers.
|
||||
</para>
|
||||
<example><title>Prepare and execute an SQL statement</title>
|
||||
<programlisting role='php'>
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Execute a prepared statement by passing an array of values */
|
||||
$sth = $dbh->prepare('SELECT name, colour, calories
|
||||
FROM fruit
|
||||
WHERE calories < :calories AND colour = :colour');
|
||||
$sth->execute(array(':calories' => 150, ':colour' => 'red'));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</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
|
||||
-->
|
45
reference/pdo/functions/PDO-rollBack.xml
Normal file
45
reference/pdo/functions/PDO-rollBack.xml
Normal file
|
@ -0,0 +1,45 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDO-rollBack">
|
||||
<refnamediv>
|
||||
<refname>PDO::rollBack</refname>
|
||||
<refpurpose>
|
||||
Rolls back a transaction
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>PDO::rollBack</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
Rolls back a transaction, returning the connection state to autocommit mode.
|
||||
</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
|
||||
-->
|
64
reference/pdo/functions/PDO-setAttribute.xml
Normal file
64
reference/pdo/functions/PDO-setAttribute.xml
Normal file
|
@ -0,0 +1,64 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- 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>
|
||||
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
Sets a database connection attribute. The generic PDO connection attributes
|
||||
include:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
<literal>PDO_ATTR_CASE</literal>: Force column names to a specific case.
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
<literal>PDO_CASE_LOWER</literal>: Force column names to lower case.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<literal>PDO_CASE_NATURAL</literal>: Leave column names as returned by
|
||||
the database driver.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<literal>PDO_CASE_UPPER</literal>: Force column names to upper case.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
PDO drivers may define further driver-specific attributes.
|
||||
</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
|
||||
-->
|
46
reference/pdo/functions/PDOStatement-bindColumn.xml
Normal file
46
reference/pdo/functions/PDOStatement-bindColumn.xml
Normal file
|
@ -0,0 +1,46 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDOStatement-bindColumn">
|
||||
<refnamediv>
|
||||
<refname>PDOStatement::bindColumn</refname>
|
||||
<refpurpose>
|
||||
bind a column to a PHP variable. On each row fetch $param will contain the value of the corresponding column. $column is the 1-based offset of the column, or the column name. For portability, don't call this before execute().
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>PDOStatement::bindColumn</methodname>
|
||||
<methodparam><type>mixed</type><parameter>$column</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter role="reference">$param</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>$type</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>$maxlen</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>mixed</type><parameter>$driverdata</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</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
|
||||
-->
|
94
reference/pdo/functions/PDOStatement-bindParam.xml
Normal file
94
reference/pdo/functions/PDOStatement-bindParam.xml
Normal file
|
@ -0,0 +1,94 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDOStatement-bindParam">
|
||||
<refnamediv>
|
||||
<refname>PDOStatement::bindParam</refname>
|
||||
<refpurpose>
|
||||
Binds a parameter to a the specified variable name
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>PDOStatement::bindParam</methodname>
|
||||
<methodparam><type>mixed</type><parameter>parameter_name</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter role="reference">variable</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>data_type</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
Binds an SQL statement parameter to the specified variable name. The SQL statement
|
||||
parameter can either be a named placeholder or a question mark placeholder.
|
||||
</para>
|
||||
<para>
|
||||
Output parameters will set the value of the bound PHP variable to the value
|
||||
returned by the database when the SQL statement is executed. This enables you
|
||||
to call stored procedures with output or input/output parameters, for example,
|
||||
for databases that support such features.
|
||||
</para>
|
||||
<para>
|
||||
For input-only variables, you can pass an array of input values to
|
||||
<function>PDOStatement::execute</function> instead.
|
||||
</para>
|
||||
<example><title>Execute a prepared statement with named placeholders</title>
|
||||
<programlisting role='php'>
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Execute a prepared statement by binding PHP variables */
|
||||
$calories = 150;
|
||||
$colour = 'red';
|
||||
$sth = $dbh->prepare('SELECT name, colour, calories
|
||||
FROM fruit
|
||||
WHERE calories < :calories AND colour = :colour');
|
||||
$sth->bindParam(':calories', $calories, PDO_PARAM_INT);
|
||||
$sth->bindParam(':colour', $colour, PDO_PARAM_STR, 12);
|
||||
$sth->execute();
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<example><title>Execute a prepared statement with question mark placeholders</title>
|
||||
<programlisting role='php'>
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Execute a prepared statement by binding PHP variables */
|
||||
$calories = 150;
|
||||
$colour = 'red';
|
||||
$sth = $dbh->prepare('SELECT name, colour, calories
|
||||
FROM fruit
|
||||
WHERE calories < ? AND colour = ?');
|
||||
$sth->bindParam(1, $calories, PDO_PARAM_INT);
|
||||
$sth->bindParam(2, $colour, PDO_PARAM_STR, 12);
|
||||
$sth->execute();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
|
||||
|
||||
</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
|
||||
-->
|
42
reference/pdo/functions/PDOStatement-errorCode.xml
Normal file
42
reference/pdo/functions/PDOStatement-errorCode.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDOStatement-errorCode">
|
||||
<refnamediv>
|
||||
<refname>PDOStatement::errorCode</refname>
|
||||
<refpurpose>
|
||||
Fetch the error code associated with the last operation on the statement handle
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>PDOStatement::errorCode</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</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
|
||||
-->
|
42
reference/pdo/functions/PDOStatement-errorInfo.xml
Normal file
42
reference/pdo/functions/PDOStatement-errorInfo.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDOStatement-errorInfo">
|
||||
<refnamediv>
|
||||
<refname>PDOStatement::errorInfo</refname>
|
||||
<refpurpose>
|
||||
Fetch extended error information associated with the last operation on the statement handle
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>PDOStatement::errorInfo</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</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
|
||||
-->
|
103
reference/pdo/functions/PDOStatement-execute.xml
Normal file
103
reference/pdo/functions/PDOStatement-execute.xml
Normal file
|
@ -0,0 +1,103 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDOStatement-execute">
|
||||
<refnamediv>
|
||||
<refname>PDOStatement::execute</refname>
|
||||
<refpurpose>
|
||||
Executes a prepared statement
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>PDOStatement::execute</methodname>
|
||||
<methodparam choice="opt"><type>array</type><parameter>input_parameters</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
Execute the prepared statement. If the prepared statement included
|
||||
parameter markers, you must either:
|
||||
<itemizedlist>
|
||||
<listitem><para>call <function>PDOStatement::bindParam</function> to bind PHP variables
|
||||
to the parameter markers: bound variables pass their value as input and receive the
|
||||
output value, if any, of their associated parameter markers</para></listitem>
|
||||
<listitem><para>or pass an array of input-only parameter values</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<example><title>Execute a prepared statement with bound variables</title>
|
||||
<programlisting role='php'>
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Execute a prepared statement by binding PHP variables */
|
||||
$calories = 150;
|
||||
$colour = 'red';
|
||||
$sth = $dbh->prepare('SELECT name, colour, calories
|
||||
FROM fruit
|
||||
WHERE calories < :calories AND colour = :colour');
|
||||
$sth->bindParam(':calories', $calories, PDO_PARAM_INT);
|
||||
$sth->bindParam(':colour', $colour, PDO_PARAM_STR, 12);
|
||||
$sth->execute();
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<example><title>Execute a prepared statement with an array of insert values</title>
|
||||
<programlisting role='php'>
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Execute a prepared statement by passing an arary of insert values */
|
||||
$calories = 150;
|
||||
$colour = 'red';
|
||||
$sth = $dbh->prepare('SELECT name, colour, calories
|
||||
FROM fruit
|
||||
WHERE calories < :calories AND colour = :colour');
|
||||
$sth->bindParam(':calories', $calories, PDO_PARAM_INT);
|
||||
$sth->bindParam(':colour', $colour, PDO_PARAM_STR, 12);
|
||||
$sth->execute(array(':calories' => $calories, ':colour' => $colour));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<example><title>Execute a prepared statement with question mark placeholders</title>
|
||||
<programlisting role='php'>
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Execute a prepared statement by binding PHP variables */
|
||||
$calories = 150;
|
||||
$colour = 'red';
|
||||
$sth = $dbh->prepare('SELECT name, colour, calories
|
||||
FROM fruit
|
||||
WHERE calories < ? AND colour = ?');
|
||||
$sth->bindParam(1, $calories, PDO_PARAM_INT);
|
||||
$sth->bindParam(2, $colour, PDO_PARAM_STR, 12);
|
||||
$sth->execute();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</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
|
||||
-->
|
77
reference/pdo/functions/PDOStatement-fetch.xml
Normal file
77
reference/pdo/functions/PDOStatement-fetch.xml
Normal file
|
@ -0,0 +1,77 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDOStatement-fetch">
|
||||
<refnamediv>
|
||||
<refname>PDOStatement::fetch</refname>
|
||||
<refpurpose>
|
||||
Fetches the next row from a result set
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>PDOStatement::fetch</methodname>
|
||||
<methodparam choice="opt"><type>int</type><parameter>fetch_style</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
Fetches a row from a result set associated with a PDOStatement object.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>fetch_style</parameter> can be one of the following values:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
<literal>PDO_FETCH_NUM</literal>: returns an array indexed by column
|
||||
number as returned in your result set, starting at column 0
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<literal>PDO_FETCH_ASSOC</literal>: returns an array indexed by column
|
||||
name as returned in your result set
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<literal>PDO_FETCH_BOTH</literal> (default): returns an array indexed by
|
||||
both column name and column number as returned in your result set
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<literal>PDO_FETCH_OBJ</literal>: returns an anonymous object with
|
||||
property names that correspond to the column names returned in your
|
||||
result set
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<literal>PDO_FETCH_LAZY</literal>: combines
|
||||
<literal>PDO_FETCH_BOTH</literal> and <literal>PDO_FETCH_OBJ</literal>,
|
||||
creating the object variable names as they are accessed
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<literal>PDO_FETCH_BOUND</literal>: returns &true; and assigns the
|
||||
values of the columns in your result set to the PHP variables to which
|
||||
they were bound with the <function>PDO::bindParam</function> method
|
||||
</para></listitem>
|
||||
</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
|
||||
-->
|
43
reference/pdo/functions/PDOStatement-fetchAll.xml
Normal file
43
reference/pdo/functions/PDOStatement-fetchAll.xml
Normal file
|
@ -0,0 +1,43 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDOStatement-fetchAll">
|
||||
<refnamediv>
|
||||
<refname>PDOStatement::fetchAll</refname>
|
||||
<refpurpose>
|
||||
Returns an array of all of the results.
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>PDOStatement::fetchAll</methodname>
|
||||
<methodparam choice="opt"><type>int</type><parameter>$how</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>=</type><parameter>PDO_FETCH_BOTH</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</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
|
||||
-->
|
42
reference/pdo/functions/PDOStatement-fetchSingle.xml
Normal file
42
reference/pdo/functions/PDOStatement-fetchSingle.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDOStatement-fetchSingle">
|
||||
<refnamediv>
|
||||
<refname>PDOStatement::fetchSingle</refname>
|
||||
<refpurpose>
|
||||
Returns a data of the 1st column in the result set.
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>PDOStatement::fetchSingle</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</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
|
||||
-->
|
42
reference/pdo/functions/PDOStatement-rowCount.xml
Normal file
42
reference/pdo/functions/PDOStatement-rowCount.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDOStatement-rowCount">
|
||||
<refnamediv>
|
||||
<refname>PDOStatement::rowCount</refname>
|
||||
<refpurpose>
|
||||
Returns the number of rows in a result set, or the number of rows affected by the last execute(). It is not always meaningful.
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>PDOStatement::rowCount</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</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
|
||||
-->
|
|
@ -1,101 +1,173 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<reference id='ref.pdo'>
|
||||
<title>PHP Data Objects</title>
|
||||
<titleabbrev>PDO</titleabbrev>
|
||||
<partintro>
|
||||
<section id='pdo.intro'>
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
&warn.experimental;
|
||||
The PDO extension defines a lightweight, consistent interface
|
||||
for accessing databases in PHP. Each database driver that
|
||||
implements the PDO interface can expose database-specific
|
||||
features as regular extension functions.
|
||||
</para>
|
||||
</section>
|
||||
<!--
|
||||
&reference.pdo.configure;
|
||||
&reference.pdo.ini;
|
||||
-->
|
||||
<section id='pdo.classes'>
|
||||
&reftitle.classes;
|
||||
<section id='pdo.class.pdo'>
|
||||
<title><classname>PDO</classname></title>
|
||||
<para>
|
||||
Represents a connection between PHP and a database server.
|
||||
</para>
|
||||
<section id='pdo.class.pdo.constructor'>
|
||||
&reftitle.constructor;
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><link linkend='function.pdo'>PDO</link> - constructs a new PDO
|
||||
object</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
<section id='pdo.class.pdo.methods'>
|
||||
&reftitle.methods;
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><link linkend='function.pdo-beginTransaction'>beginTransaction
|
||||
</link> - begins a transaction</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.pdo-commit'>commit</link> - commits a
|
||||
transaction</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.pdo-errorInfo'>errorInfo</link> -
|
||||
retrieves an array of error information, if any, from the
|
||||
database</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.pdo-getMessage'>getMessage</link> -
|
||||
retrieves an error message, if any, from the database</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.pdo-prepare'>prepare</link> - prepares
|
||||
an SQL statement for execution</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.pdo-rollback'>rollback</link> - roll
|
||||
back a transaction</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.pdo-setAttribute'>setAttribute</link> -
|
||||
sets a database connection attribute</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
</section>
|
||||
<section id='pdo.class.Statement'>
|
||||
<title><classname>Statement</classname></title>
|
||||
<para>Represents a prepared statement and, after the statement is
|
||||
executed, an associated result set.</para>
|
||||
<section id='pdo.class.Statement.methods'>
|
||||
&reftitle.methods;
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><link linkend='function.pdo-bindParam'>bindParam</link> - binds a
|
||||
PHP variable to a parameter in the prepared statement</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.pdo-execute'>execute</link> - executes a
|
||||
prepared statement</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.pdo-fetch'>fetch</link> - fetches a
|
||||
row from a result set</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
</partintro>
|
||||
&reference.pdo.functions;
|
||||
</reference>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<reference id="ref.pdo">
|
||||
<title>pdo Functions</title>
|
||||
<titleabbrev>pdo</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
<section id="pdo.intro">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
&warn.experimental;
|
||||
The PDO extension defines a lightweight, consistent interface
|
||||
for accessing databases in PHP. Each database driver that
|
||||
implements the PDO interface can expose database-specific
|
||||
features as regular extension functions.
|
||||
</para>
|
||||
</section>
|
||||
<section id="pdo.installation">
|
||||
&reftitle.install;
|
||||
<para>
|
||||
PDO is currently available as a PECL extension from
|
||||
<ulink url='&url.pecl.package;pdo'>&url.pecl.package;pdo</ulink>.
|
||||
Ensure you have installed the CGI version of PHP and that the
|
||||
<command>pear</command> and <command>phpize</command> scripts are
|
||||
available in your current path.
|
||||
</para>
|
||||
<para>
|
||||
Run the following command to download, build, and install the
|
||||
latest stable version of PDO:
|
||||
<screen>
|
||||
<![CDATA[
|
||||
pear install pdo
|
||||
]]>
|
||||
</screen>
|
||||
</para>
|
||||
<para>
|
||||
Windows users can download the extension DLL <filename>pdo.dll</filename>
|
||||
from <ulink url='&url.pecl.get.win;'>&url.pecl.get.win;</ulink>
|
||||
</para>
|
||||
<para>
|
||||
The <command>pear</command> command automatically installs the
|
||||
PDO module into your PHP extensions directory. To enable the
|
||||
PDO extension on UNIX or Linux operating systems, you must add
|
||||
the following line to &php.ini;:
|
||||
<screen>
|
||||
<![CDATA[
|
||||
extension=pdo.so
|
||||
]]>
|
||||
</screen>
|
||||
To enable the PDO extension on Windows operating systems, you must
|
||||
add the following line to &php.ini;:
|
||||
<screen>
|
||||
<![CDATA[
|
||||
extension=pdo.dll
|
||||
]]>
|
||||
</screen>
|
||||
</para>
|
||||
</section>
|
||||
<section id='pdo.classes'>
|
||||
&reftitle.classes;
|
||||
<section id='pdo.class.PDO'>
|
||||
<title><classname>PDO</classname></title>
|
||||
<para>
|
||||
Represents a connection between PHP and a database server.
|
||||
</para>
|
||||
<section id='pdo.class.PDO.constructor'>
|
||||
&reftitle.constructor;
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDO-construct'>PDO</link> - constructs a new PDO
|
||||
object</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
<section id='pdo.class.PDO.methods'>
|
||||
&reftitle.methods;
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDO-beginTransaction'>beginTransaction
|
||||
</link> - begins a transaction</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDO-commit'>commit</link> - commits a
|
||||
transaction</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDO-exec'>exec</link> - issues an SQL
|
||||
statement</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDO-errorCode'>errorCode</link> -
|
||||
retrieves an error code, if any, from the database</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDO-errorInfo'>errorInfo</link> -
|
||||
retrieves an array of error information, if any, from the
|
||||
database</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDO-lastInsertID'>lastInsertID</link> -
|
||||
retrieves the value of the last row that was inserted into a
|
||||
table</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDO-prepare'>prepare</link> - prepares
|
||||
an SQL statement for execution</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDO-rollback'>rollback</link> - roll
|
||||
back a transaction</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDO-setAttribute'>setAttribute</link> -
|
||||
sets a database connection attribute</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
</section>
|
||||
<section id='pdo.class.PDOStatement'>
|
||||
<title><classname>PDOStatement</classname></title>
|
||||
<para>Represents a prepared statement and, after the statement is
|
||||
executed, an associated result set.</para>
|
||||
<section id='pdo.class.Statement.methods'>
|
||||
&reftitle.methods;
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDOStatement-bindColumn'>bindColumn</link> - binds a
|
||||
PHP variable to an output column in a result set</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDOStatement-bindParam'>bindParam</link> - binds a
|
||||
PHP variable to a parameter in the prepared statement</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDOStatement-errorCode'>errorCode</link> -
|
||||
retrieves an error code, if any, from the statement</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDOStatement-errorInfo'>errorInfo</link> -
|
||||
retrieves an array of error information, if any, from the statement</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDOStatement-execute'>execute</link> - executes a
|
||||
prepared statement</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDOStatement-fetch'>fetch</link> - fetches a
|
||||
row from a result set</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDOStatement-fetchAll'>fetchAll</link> - fetches an
|
||||
array containing all of the rows from a result set</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDOStatement-fetchSingle'>fetchSingle</link> - returns
|
||||
the data from the first column in a result set</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDOStatement-rowCount'>rowCount</link> - returns the
|
||||
number of rows that were affected by the execution of an SQL statement</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
&reference.pdo.constants;
|
||||
</partintro>
|
||||
&reference.pdo.functions;
|
||||
</reference>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
Loading…
Reference in a new issue