mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Flesh out PDO::exec, add new files based on xml_proto skeletons.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@177507 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
72abc2a3a6
commit
06748b6a71
9 changed files with 1036 additions and 22 deletions
|
@ -1,24 +1,109 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- 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>int</type><methodname>PDO::exec</methodname>
|
||||
<methodparam><type>string</type><parameter>query</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDO-exec">
|
||||
<refnamediv>
|
||||
<refname>PDO::exec</refname>
|
||||
<refpurpose>
|
||||
Execute an SQL statement and return the number of affected rows
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>long</type><methodname>PDO::exec</methodname>
|
||||
<methodparam><type>string</type><parameter>statement</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.undocumented.func;
|
||||
&warn.experimental.func;
|
||||
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<para>
|
||||
<function>PDO::exec</function> prepares and executes an SQL statement in
|
||||
a single function call, returning the number of rows affected by the
|
||||
statement.
|
||||
</para>
|
||||
<para>
|
||||
<function>PDO::exec</function> does not return results from a SELECT
|
||||
statement. For a SELECT statement that you only need to issue once
|
||||
during your program, consider issuing <function>PDO::query</function>.
|
||||
For a SELECT statement that you need to issue multiple times, prepare
|
||||
a PDOStatement object with <function>PDO::prepare</function> and issue
|
||||
the statement with <function>PDOStatement::execute</function>.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>statement</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The SQL statement to prepare and execute.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>PDO::exec</function> returns the number of rows that were modified
|
||||
or deleted by the SQL statement you issued. If no rows were affected,
|
||||
<function>PDO::exec</function> returns <literal>0</literal>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Issuing a DELETE statement</title>
|
||||
<para>
|
||||
Count the number of rows deleted by a DELETE statement with no WHERE
|
||||
clause.
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$dbh = new PDO('odbc:sample', 'db2inst1', 'ibmdb2');
|
||||
|
||||
/* Delete all rows from the FRUIT table */
|
||||
$count = $dbh->exec("DELETE FROM fruit WHERE colour = 'red'");
|
||||
|
||||
/* Return number of rows that were deleted */
|
||||
print("Return number of rows that were deleted:\n");
|
||||
print("Deleted $count rows.\n");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Return number of rows that were deleted:
|
||||
Deleted 1 rows.
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>PDO::prepare</function></member>
|
||||
<member><function>PDO::query</function></member>
|
||||
<member><function>PDOStatement::execute</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
112
reference/pdo/functions/PDO-getAttribute.xml
Normal file
112
reference/pdo/functions/PDO-getAttribute.xml
Normal file
|
@ -0,0 +1,112 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDO-getAttribute">
|
||||
<refnamediv>
|
||||
<refname>PDO::getAttribute</refname>
|
||||
<refpurpose>
|
||||
Retrive a database connection attribute
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>PDO::getAttribute</methodname>
|
||||
<methodparam><type>long</type><parameter>attribute</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</refsect1>
|
||||
|
||||
<!--
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>attribute</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Its description
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
What the function returns, first on success, then on failure. See
|
||||
also the &return.success; entity
|
||||
</para>
|
||||
</refsect1>
|
||||
-->
|
||||
|
||||
<!-- Use when examples exist
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>A PDO-getAttribute example</title>
|
||||
<para>
|
||||
Any text that describes the purpose of the example, or
|
||||
what goes on in the example should go here (inside the
|
||||
<example> tag, not out
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
if ($anexample === true) {
|
||||
echo 'Use the PEAR Coding Standards';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Use the PEAR Coding Standards
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
-->
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>PDO::setAttribute</function></member>
|
||||
<member><function>PDOStatement::getAttribute</function></member>
|
||||
<member><function>PDOStatement::setAttribute</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
119
reference/pdo/functions/PDO-query.xml
Normal file
119
reference/pdo/functions/PDO-query.xml
Normal file
|
@ -0,0 +1,119 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDO-query">
|
||||
<refnamediv>
|
||||
<refname>PDO::query</refname>
|
||||
<refpurpose>
|
||||
Executes an SQL statement, returning a result set as a PDOStatement object
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>object</type><methodname>PDO::query</methodname>
|
||||
<methodparam><type>string</type><parameter>statement</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.experimental.func;
|
||||
|
||||
<para>
|
||||
<function>PDO::query</function> prepares and executes an SQL statement in
|
||||
a single function call, returning the result set (if any) returned by the
|
||||
statement as a PDOStatement object.
|
||||
</para>
|
||||
<para>
|
||||
For a SELECT statement that you need to issue multiple times, prepare
|
||||
a PDOStatement object with <function>PDO::prepare</function> and issue
|
||||
the statement with <function>PDOStatement::execute</function>.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>statement</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The SQL statement to prepare and execute.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<function>PDO::query</function> returns a PDOStatement object.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<!-- Use when examples exist
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>A PDO-query example</title>
|
||||
<para>
|
||||
Any text that describes the purpose of the example, or
|
||||
what goes on in the example should go here (inside the
|
||||
<example> tag, not out
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
if ($anexample === true) {
|
||||
echo 'Use the PEAR Coding Standards';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Use the PEAR Coding Standards
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
-->
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>PDO::exec</function></member>
|
||||
<member><function>PDO::prepare</function></member>
|
||||
<member><function>PDOStatement::execute</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
116
reference/pdo/functions/PDOStatement-columnCount.xml
Normal file
116
reference/pdo/functions/PDOStatement-columnCount.xml
Normal file
|
@ -0,0 +1,116 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDOStatement-columnCount">
|
||||
<refnamediv>
|
||||
<refname>PDOStatement::columnCount</refname>
|
||||
<refpurpose>
|
||||
Returns the number of columns in the result set
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>PDOStatement::columnCount</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.experimental.func;
|
||||
<para>
|
||||
Use <function>PDOStatement::columnCount</function> to return the number
|
||||
of columns in the result set represented by the PDOStatement object.
|
||||
</para>
|
||||
<para>
|
||||
If the PDOStatement object was returned from <function>PDO::query</function>,
|
||||
the column count is immediately available.
|
||||
</para>
|
||||
<para>
|
||||
If the PDOStatement object was returned from
|
||||
<function>PDO::prepare</function>, an accurate column count will not be
|
||||
available until you invoke <function>PDOStatement::execute</function>.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the number of columns in the result set represented by the
|
||||
PDOStatement object. If there is no result set,
|
||||
<function>PDOStatement::columnCount</function> returns <literal>0</literal>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Counting columns</title>
|
||||
<para>
|
||||
This example demonstrates how <function>PDOStatement::columnCount</function>
|
||||
operates with and without a result set.
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$dbh = new PDO('odbc:sample', 'db2inst1', 'ibmdb2');
|
||||
|
||||
$sth = $dbh->prepare("SELECT name, colour FROM fruit");
|
||||
|
||||
/* Count the number of columns in the (non-existent) result set */
|
||||
$colcount = $sth->columnCount();
|
||||
print("Before execute(), result set has $colcount columns (should be 0)\n");
|
||||
|
||||
$sth->execute();
|
||||
|
||||
/* Count the number of columns in the result set */
|
||||
$colcount = $sth->columnCount();
|
||||
print("After execute(), result set has $colcount columns (should be 2)\n");
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Before execute(), result set has 0 columns (should be 0)
|
||||
After execute(), result set has 2 columns (should be 2)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>PDO::prepare</function></member>
|
||||
<member><function>PDOStatement::execute</function></member>
|
||||
<member><function>PDOStatement::rowCount</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
110
reference/pdo/functions/PDOStatement-getAttribute.xml
Normal file
110
reference/pdo/functions/PDOStatement-getAttribute.xml
Normal file
|
@ -0,0 +1,110 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDOStatement-getAttribute">
|
||||
<refnamediv>
|
||||
<refname>PDOStatement::getAttribute</refname>
|
||||
<refpurpose>
|
||||
Retrieve a statement attribute
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>PDOStatement::getAttribute</methodname>
|
||||
<methodparam><type>long</type><parameter>attribute</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</refsect1>
|
||||
|
||||
<!--
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>attribute</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Its description
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
What the function returns, first on success, then on failure. See
|
||||
also the &return.success; entity
|
||||
</para>
|
||||
</refsect1>
|
||||
-->
|
||||
|
||||
<!-- Use when examples exist
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>A PDOStatement-getAttribute example</title>
|
||||
<para>
|
||||
Any text that describes the purpose of the example, or
|
||||
what goes on in the example should go here (inside the
|
||||
<example> tag, not out
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
if ($anexample === true) {
|
||||
echo 'Use the PEAR Coding Standards';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Use the PEAR Coding Standards
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
-->
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>PDO::getAttribute</function></member>
|
||||
<member><function>PDO::setAttribute</function></member>
|
||||
<member><function>PDOStatement::setAttribute</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
145
reference/pdo/functions/PDOStatement-getColumnMeta.xml
Normal file
145
reference/pdo/functions/PDOStatement-getColumnMeta.xml
Normal file
|
@ -0,0 +1,145 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDOStatement-getColumnMeta">
|
||||
<refnamediv>
|
||||
<refname>PDOStatement::getColumnMeta</refname>
|
||||
<refpurpose>
|
||||
Returns meta data for a numbered column
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>PDOStatement::getColumnMeta</methodname>
|
||||
<methodparam><type>int</type><parameter>$column</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>$column</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Its description
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
What the function returns, first on success, then on failure. See
|
||||
also the &return.success; entity
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<!-- Use when EXCEPTIONS exist
|
||||
<refsect1 role="exceptions">
|
||||
&reftitle.exceptions;
|
||||
<para>
|
||||
When does this function throw exceptions?
|
||||
</para>
|
||||
</refsect1>
|
||||
-->
|
||||
|
||||
|
||||
<!-- Use when a CHANGELOG exists
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>Enter the PHP version of change here
|
||||
<entry>Description of change
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
-->
|
||||
|
||||
|
||||
<!-- Use when examples exist
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>A PDOStatement-getColumnMeta example</title>
|
||||
<para>
|
||||
Any text that describes the purpose of the example, or
|
||||
what goes on in the example should go here (inside the
|
||||
<example> tag, not out
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
if ($anexample === true) {
|
||||
echo 'Use the PEAR Coding Standards';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Use the PEAR Coding Standards
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
-->
|
||||
|
||||
|
||||
<!-- Use when adding See Also links
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function></function></member>
|
||||
<member>Or <link linkend="somethingelse">something else</link></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
154
reference/pdo/functions/PDOStatement-setAttribute.xml
Normal file
154
reference/pdo/functions/PDOStatement-setAttribute.xml
Normal file
|
@ -0,0 +1,154 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDOStatement-setAttribute">
|
||||
<refnamediv>
|
||||
<refname>PDOStatement::setAttribute</refname>
|
||||
<refpurpose>
|
||||
Set a statement attribute
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>PDOStatement::setAttribute</methodname>
|
||||
<methodparam><type>long</type><parameter>attribute</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</refsect1>
|
||||
|
||||
<!--
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>attribute</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Its description
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Its description
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
What the function returns, first on success, then on failure. See
|
||||
also the &return.success; entity
|
||||
</para>
|
||||
</refsect1>
|
||||
-->
|
||||
|
||||
<!-- Use when EXCEPTIONS exist
|
||||
<refsect1 role="exceptions">
|
||||
&reftitle.exceptions;
|
||||
<para>
|
||||
When does this function throw exceptions?
|
||||
</para>
|
||||
</refsect1>
|
||||
-->
|
||||
|
||||
|
||||
<!-- Use when a CHANGELOG exists
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>Enter the PHP version of change here
|
||||
<entry>Description of change
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
-->
|
||||
|
||||
|
||||
<!-- Use when examples exist
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>A PDOStatement-setAttribute example</title>
|
||||
<para>
|
||||
Any text that describes the purpose of the example, or
|
||||
what goes on in the example should go here (inside the
|
||||
<example> tag, not out
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
if ($anexample === true) {
|
||||
echo 'Use the PEAR Coding Standards';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Use the PEAR Coding Standards
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
-->
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>PDO::getAttribute</function></member>
|
||||
<member><function>PDO::setAttribute</function></member>
|
||||
<member><function>PDOStatement::getAttribute</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
145
reference/pdo/functions/PDOStatement-setFetchMode.xml
Normal file
145
reference/pdo/functions/PDOStatement-setFetchMode.xml
Normal file
|
@ -0,0 +1,145 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDOStatement-setFetchMode">
|
||||
<refnamediv>
|
||||
<refname>PDOStatement::setFetchMode</refname>
|
||||
<refpurpose>
|
||||
Returns meta data for a numbered column
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>PDOStatement::setFetchMode</methodname>
|
||||
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>mode</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Its description
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
What the function returns, first on success, then on failure. See
|
||||
also the &return.success; entity
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<!-- Use when EXCEPTIONS exist
|
||||
<refsect1 role="exceptions">
|
||||
&reftitle.exceptions;
|
||||
<para>
|
||||
When does this function throw exceptions?
|
||||
</para>
|
||||
</refsect1>
|
||||
-->
|
||||
|
||||
|
||||
<!-- Use when a CHANGELOG exists
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>Enter the PHP version of change here
|
||||
<entry>Description of change
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
-->
|
||||
|
||||
|
||||
<!-- Use when examples exist
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>A PDOStatement-setFetchMode example</title>
|
||||
<para>
|
||||
Any text that describes the purpose of the example, or
|
||||
what goes on in the example should go here (inside the
|
||||
<example> tag, not out
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
if ($anexample === true) {
|
||||
echo 'Use the PEAR Coding Standards';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Use the PEAR Coding Standards
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
-->
|
||||
|
||||
|
||||
<!-- Use when adding See Also links
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function></function></member>
|
||||
<member>Or <link linkend="somethingelse">something else</link></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.12 $ -->
|
||||
<!-- $Revision: 1.13 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<reference id="ref.pdo">
|
||||
<title>PDO Functions</title>
|
||||
<titleabbrev>pdo</titleabbrev>
|
||||
<titleabbrev>PDO</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
<section id="pdo.intro">
|
||||
|
@ -133,7 +133,7 @@ extension=php_pdo.dll
|
|||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDO-exec'>exec</link> - issues an SQL
|
||||
statement</para>
|
||||
statement and returns the number of affected rows</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDO-errorCode'>errorCode</link> -
|
||||
|
@ -144,6 +144,10 @@ extension=php_pdo.dll
|
|||
retrieves an array of error information, if any, from the
|
||||
database</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDO-getAttribute'>getAttribute</link> -
|
||||
retrieves a database connection attribute</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDO-lastInsertId'>lastInsertId</link> -
|
||||
retrieves the value of the last row that was inserted into a
|
||||
|
@ -153,6 +157,10 @@ extension=php_pdo.dll
|
|||
<para><link linkend='function.PDO-prepare'>prepare</link> - prepares
|
||||
an SQL statement for execution</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDO-query'>query</link> - issues an SQL
|
||||
statement and returns a result set</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDO-rollBack'>rollBack</link> - roll
|
||||
back a transaction</para>
|
||||
|
@ -179,6 +187,10 @@ extension=php_pdo.dll
|
|||
<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-columnCount'>columnCount</link> -
|
||||
returns the number of columns in the result set</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDOStatement-errorCode'>errorCode</link> -
|
||||
retrieves an error code, if any, from the statement</para>
|
||||
|
@ -203,10 +215,26 @@ extension=php_pdo.dll
|
|||
<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-getAttribute'>getAttribute</link> -
|
||||
retrieves a PDOStatement attribute</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDOStatement-getColumnMeta'>getColumnMeta</link> -
|
||||
retrieves metadata for a column in the 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>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDOStatement-setAttribute'>setAttribute</link> -
|
||||
sets a PDOStatement attribute</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><link linkend='function.PDOStatement-setFetchMode'>setFetchMode</link> -
|
||||
sets the fetch mode for a PDOStatement</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
</section>
|
||||
|
|
Loading…
Reference in a new issue