mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Address user notes and add a few more details.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@198804 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
3d07b38112
commit
c10d9cba0c
4 changed files with 44 additions and 16 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDO-lastInsertId">
|
||||
<refnamediv>
|
||||
|
@ -17,13 +17,15 @@
|
|||
|
||||
<para>
|
||||
Returns the ID of the last inserted row, or the last value from a
|
||||
sequence object, depending on the underlying driver.
|
||||
sequence object, depending on the underlying driver. For example,
|
||||
<function>PDO_PGSQL</function> requires you to specify the name of
|
||||
a sequence object for the <parameter>name</parameter> parameter.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
This method may not return a meaningful/consistent result across different PDO
|
||||
drivers, because the underlying database may not even support the notion
|
||||
of auto-increment fields or sequences.
|
||||
This method may not return a meaningful or consistent result across
|
||||
different PDO drivers, because the underlying database may not even
|
||||
support the notion of auto-increment fields or sequences.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDO-query">
|
||||
<refnamediv>
|
||||
|
@ -26,6 +26,13 @@
|
|||
<function>PDO::prepare</function> and issue the statement with multiple
|
||||
calls to <function>PDOStatement::execute</function>.
|
||||
</para>
|
||||
<para>
|
||||
If you do not fetch all of the data in a result set before issuing your
|
||||
next call to <function>PDO::query</function>, your call may fail. Call
|
||||
<function>PDOStatement::closeCursor</function> to release the database
|
||||
resources associated with the PDOStatement object before issuing your
|
||||
next call to <function>PDO::query</function>.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDOStatement-fetch">
|
||||
<refnamediv>
|
||||
|
@ -18,7 +18,9 @@
|
|||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
Fetches a row from a result set associated with a PDOStatement object.
|
||||
Fetches a row from a result set associated with a PDOStatement object. The
|
||||
<parameter>fetch_style</parameter> parameter determines how PDO returns
|
||||
the row.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -40,7 +42,8 @@
|
|||
</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
|
||||
both column name and 0-indexed column number as returned in your
|
||||
result set
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<literal>PDO::FETCH_BOUND</literal>: returns &true; and assigns the
|
||||
|
@ -48,20 +51,30 @@
|
|||
they were bound with the <function>PDOStatement::bindParam</function>
|
||||
method
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<literal>PDO::FETCH_CLASS</literal>: returns a new instance of the
|
||||
requested class, mapping the columns of the result set to named
|
||||
properties in the class
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<literal>PDO::FETCH_INTO</literal>: updates an existing instance
|
||||
of the requested class, mapping the columns of the result set to
|
||||
named properties in the class
|
||||
</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_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_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_NUM</literal>: returns an array indexed by column
|
||||
number as returned in your result set, starting at column 0
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</listitem>
|
||||
|
@ -73,7 +86,11 @@
|
|||
For a PDOStatement object representing a scrollable cursor, this
|
||||
value determines which row will be returned to the caller. This value
|
||||
must be one of the <literal>PDO::FETCH_ORI_*</literal> constants,
|
||||
defaulting to <literal>PDO::FETCH_ORI_NEXT</literal>.
|
||||
defaulting to <literal>PDO::FETCH_ORI_NEXT</literal>. To request a
|
||||
scrollable cursor for your PDOStatement object, you must set the
|
||||
<literal>PDO::ATTR_CURSOR</literal> attribute to
|
||||
<literal>PDO::CURSOR_SCROLL</literal> when you prepare the SQL
|
||||
statement with <function>PDO::prepare</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDOStatement-fetchAll">
|
||||
<refnamediv>
|
||||
|
@ -32,7 +32,9 @@
|
|||
</para>
|
||||
<para>
|
||||
To return an array consisting of all values of a single column from
|
||||
the result set, specify <literal>PDO::FETCH_COLUMN</literal>.
|
||||
the result set, specify <literal>PDO::FETCH_COLUMN</literal>. You
|
||||
can specify which column you want with the
|
||||
<parameter>column-index</parameter> parameter.
|
||||
</para>
|
||||
<para>
|
||||
To fetch only the unique values of a single column from the result set,
|
||||
|
|
Loading…
Reference in a new issue