cvs: phpdoc /en/reference/pdo/functions PDO-lastInsertId.xml PDO-query.xml PDOStatement-fetch.xml PDOStatement-fetchAll.xml

From: Date: Wed, 19 Oct 2005 20:45:05 +0000
Subject: cvs: phpdoc /en/reference/pdo/functions PDO-lastInsertId.xml PDO-query.xml PDOStatement-fetch.xml PDOStatement-fetchAll.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969370630@lists.php.net to get a copy of this message
dbs Wed Oct 19 16:45:05 2005 EDT Modified files: /phpdoc/en/reference/pdo/functions PDO-lastInsertId.xml PDO-query.xml PDOStatement-fetch.xml PDOStatement-fetchAll.xml Log: Address user notes and add a few more details. http://cvs.php.net/diff.php/phpdoc/en/reference/pdo/functions/PDO-lastInsertId.xml?r1=1.9&r2=1.10&ty=u Index: phpdoc/en/reference/pdo/functions/PDO-lastInsertId.xml diff -u phpdoc/en/reference/pdo/functions/PDO-lastInsertId.xml:1.9 phpdoc/en/reference/pdo/functions/PDO-lastInsertId.xml:1.10 --- phpdoc/en/reference/pdo/functions/PDO-lastInsertId.xml:1.9 Sun Sep 11 02:22:26 2005 +++ phpdoc/en/reference/pdo/functions/PDO-lastInsertId.xml Wed Oct 19 16:45:02 2005 @@ -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> http://cvs.php.net/diff.php/phpdoc/en/reference/pdo/functions/PDO-query.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc/en/reference/pdo/functions/PDO-query.xml diff -u phpdoc/en/reference/pdo/functions/PDO-query.xml:1.5 phpdoc/en/reference/pdo/functions/PDO-query.xml:1.6 --- phpdoc/en/reference/pdo/functions/PDO-query.xml:1.5 Sun Sep 11 02:22:26 2005 +++ phpdoc/en/reference/pdo/functions/PDO-query.xml Wed Oct 19 16:45:02 2005 @@ -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"> http://cvs.php.net/diff.php/phpdoc/en/reference/pdo/functions/PDOStatement-fetch.xml?r1=1.9&r2=1.10&ty=u Index: phpdoc/en/reference/pdo/functions/PDOStatement-fetch.xml diff -u phpdoc/en/reference/pdo/functions/PDOStatement-fetch.xml:1.9 phpdoc/en/reference/pdo/functions/PDOStatement-fetch.xml:1.10 --- phpdoc/en/reference/pdo/functions/PDOStatement-fetch.xml:1.9 Tue Sep 20 04:22:29 2005 +++ phpdoc/en/reference/pdo/functions/PDOStatement-fetch.xml Wed Oct 19 16:45:02 2005 @@ -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 @@ -49,19 +52,29 @@ 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> http://cvs.php.net/diff.php/phpdoc/en/reference/pdo/functions/PDOStatement-fetchAll.xml?r1=1.9&r2=1.10&ty=u Index: phpdoc/en/reference/pdo/functions/PDOStatement-fetchAll.xml diff -u phpdoc/en/reference/pdo/functions/PDOStatement-fetchAll.xml:1.9 phpdoc/en/reference/pdo/functions/PDOStatement-fetchAll.xml:1.10 --- phpdoc/en/reference/pdo/functions/PDOStatement-fetchAll.xml:1.9 Tue Sep 20 04:22:29 2005 +++ phpdoc/en/reference/pdo/functions/PDOStatement-fetchAll.xml Wed Oct 19 16:45:02 2005 @@ -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,

« previous php.doc (#969370630) next »