cvs: phpdoc /en/reference/ibm_db2/functions db2-fetch-assoc.xml db2-fetch-both.xml db2-fetch-into.xml db2-fetch-object.xml db2-fetch-row.xml
db2-result.xml
| From: | Dan Scott | Date: | Fri, 29 Apr 2005 14:26:06 +0000 |
| Subject: | cvs: phpdoc /en/reference/ibm_db2/functions db2-fetch-assoc.xml db2-fetch-both.xml db2-fetch-into.xml db2-fetch-object.xml db2-fetch-row.xml db2-result.xml |
||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969368110@lists.php.net to get a copy of this message | ||
dbs Fri Apr 29 10:26:06 2005 EDT
Added files:
/phpdoc/en/reference/ibm_db2/functions db2-fetch-object.xml
Modified files:
/phpdoc/en/reference/ibm_db2/functions db2-fetch-assoc.xml
db2-fetch-both.xml
db2-fetch-into.xml
db2-fetch-row.xml
db2-result.xml
Log:
Document db2_fetch_object().
http://cvs.php.net/diff.php/phpdoc/en/reference/ibm_db2/functions/db2-fetch-assoc.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/ibm_db2/functions/db2-fetch-assoc.xml diff -u phpdoc/en/reference/ibm_db2/functions/db2-fetch-assoc.xml:1.2 phpdoc/en/reference/ibm_db2/functions/db2-fetch-assoc.xml:1.3 --- phpdoc/en/reference/ibm_db2/functions/db2-fetch-assoc.xml:1.2 Sat Apr 16 22:50:00 2005 +++ phpdoc/en/reference/ibm_db2/functions/db2-fetch-assoc.xml Fri Apr 29 10:26:06 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. --> <refentry id="function.db2-fetch-assoc"> <refnamediv> @@ -136,6 +136,7 @@ <simplelist> <member><function>db2_fetch_both</function></member> <member><function>db2_fetch_into</function></member> + <member><function>db2_fetch_object</function></member> <member><function>db2_fetch_row</function></member> <member><function>db2_result</function></member> </simplelist> http://cvs.php.net/diff.php/phpdoc/en/reference/ibm_db2/functions/db2-fetch-both.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/ibm_db2/functions/db2-fetch-both.xml diff -u phpdoc/en/reference/ibm_db2/functions/db2-fetch-both.xml:1.2 phpdoc/en/reference/ibm_db2/functions/db2-fetch-both.xml:1.3 --- phpdoc/en/reference/ibm_db2/functions/db2-fetch-both.xml:1.2 Sat Apr 16 22:50:00 2005 +++ phpdoc/en/reference/ibm_db2/functions/db2-fetch-both.xml Fri Apr 29 10:26:06 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. --> <refentry id="function.db2-fetch-both"> <refnamediv> @@ -143,6 +143,7 @@ <simplelist> <member><function>db2_fetch_assoc</function></member> <member><function>db2_fetch_into</function></member> + <member><function>db2_fetch_object</function></member> <member><function>db2_fetch_row</function></member> <member><function>db2_result</function></member> </simplelist> http://cvs.php.net/diff.php/phpdoc/en/reference/ibm_db2/functions/db2-fetch-into.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/ibm_db2/functions/db2-fetch-into.xml diff -u phpdoc/en/reference/ibm_db2/functions/db2-fetch-into.xml:1.2 phpdoc/en/reference/ibm_db2/functions/db2-fetch-into.xml:1.3 --- phpdoc/en/reference/ibm_db2/functions/db2-fetch-into.xml:1.2 Sat Apr 16 22:50:00 2005 +++ phpdoc/en/reference/ibm_db2/functions/db2-fetch-into.xml Fri Apr 29 10:26:06 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. --> <refentry id="function.db2-fetch-into"> <refnamediv> @@ -136,6 +136,7 @@ <simplelist> <member><function>db2_fetch_assoc</function></member> <member><function>db2_fetch_both</function></member> + <member><function>db2_fetch_object</function></member> <member><function>db2_fetch_row</function></member> <member><function>db2_result</function></member> </simplelist> http://cvs.php.net/diff.php/phpdoc/en/reference/ibm_db2/functions/db2-fetch-row.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/ibm_db2/functions/db2-fetch-row.xml diff -u phpdoc/en/reference/ibm_db2/functions/db2-fetch-row.xml:1.2 phpdoc/en/reference/ibm_db2/functions/db2-fetch-row.xml:1.3 --- phpdoc/en/reference/ibm_db2/functions/db2-fetch-row.xml:1.2 Wed Apr 13 20:42:42 2005 +++ phpdoc/en/reference/ibm_db2/functions/db2-fetch-row.xml Fri Apr 29 10:26:06 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. --> <refentry id="function.db2-fetch-row"> <refnamediv> @@ -112,6 +112,7 @@ <member><function>db2_fetch_assoc</function></member> <member><function>db2_fetch_both</function></member> <member><function>db2_fetch_into</function></member> + <member><function>db2_fetch_object</function></member> <member><function>db2_result</function></member> </simplelist> </para> http://cvs.php.net/diff.php/phpdoc/en/reference/ibm_db2/functions/db2-result.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/ibm_db2/functions/db2-result.xml diff -u phpdoc/en/reference/ibm_db2/functions/db2-result.xml:1.2 phpdoc/en/reference/ibm_db2/functions/db2-result.xml:1.3 --- phpdoc/en/reference/ibm_db2/functions/db2-result.xml:1.2 Wed Apr 13 20:42:43 2005 +++ phpdoc/en/reference/ibm_db2/functions/db2-result.xml Fri Apr 29 10:26:06 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. --> <refentry id="function.db2-result"> <refnamediv> @@ -100,6 +100,10 @@ &reftitle.seealso; <para> <simplelist> + <member><function>db2_fetch_assoc</function></member> + <member><function>db2_fetch_both</function></member> + <member><function>db2_fetch_into</function></member> + <member><function>db2_fetch_object</function></member> <member><function>db2_fetch_row</function></member> </simplelist> </para> http://cvs.php.net/co.php/phpdoc/en/reference/ibm_db2/functions/db2-fetch-object.xml?r=1.1&p=1 Index: phpdoc/en/reference/ibm_db2/functions/db2-fetch-object.xml +++ phpdoc/en/reference/ibm_db2/functions/db2-fetch-object.xml <?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.db2-fetch-object"> <refnamediv> <refname>db2_fetch_object</refname> <refpurpose> Returns an object with properties representing columns in the fetched row </refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>object</type><methodname>db2_fetch_object</methodname> <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>row_number</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> Returns an object in which each property represents a column returned in the row fetched from a result set. </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>stmt</parameter></term> <listitem> <para> A valid <literal>stmt</literal> resource containing a result set. </para> </listitem> </varlistentry> <varlistentry> <term><parameter>row_number</parameter></term> <listitem> <para> Requests a specific 1-indexed row from the result set. Passing this parameter results in a PHP warning if the result set uses a forward-only cursor. </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> Returns an object representing a single row in the result set. The properties of the object map to the names of the columns in the result set. </para> <para> The IBM DB2, Cloudscape, and Apache Derby database servers typically fold column names to upper-case, so the object properties will reflect that case. </para> <para> If your SELECT statement calls a scalar function to modify the value of a column, the database servers return the column number as the name of the column in the result set. If you prefer a more descriptive column name and object property, you can use the AS clause to assign a name to the column in the result set. </para> <para> Returns &false; if no row was retrieved. </para> </refsect1> <refsect1 role="examples"> &reftitle.examples; <para> <example> <title>A <function>db2_fetch_object</function> example</title> <para> The following example issues a SELECT statement with a scalar function, RTRIM, that removes whitespace from the end of the column. Rather than creating an object with the properties "BREED" and "2", we use the AS clause in the SELECT statement to assign the name "name" to the modified column. The database server folds the column names to upper-case, resulting in an object with the properties "BREED" and "NAME". </para> <programlisting role="php"> <![CDATA[ <?php $conn = db2_connect($database, $user, $password); $sql = "SELECT breed, RTRIM(name) AS name FROM animals WHERE id = ?"; if ($conn) { $stmt = db2_prepare($conn, $sql); db2_execute($stmt, array(0)); while ($pet = db2_fetch_object($stmt)) { echo "Come here, {$pet->NAME}, my little {$pet->BREED}!"; } db2_close($conn); } ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Come here, Pook, my little cat! ]]> </screen> </example> </para> </refsect1> <refsect1 role="seealso"> &reftitle.seealso; <para> <simplelist> <member><function>db2_fetch_assoc</function></member> <member><function>db2_fetch_both</function></member> <member><function>db2_fetch_into</function></member> <member><function>db2_fetch_row</function></member> <member><function>db2_result</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 -->
http://cvs.php.net/diff.php/phpdoc/en/reference/ibm_db2/functions/db2-fetch-assoc.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/ibm_db2/functions/db2-fetch-assoc.xml diff -u phpdoc/en/reference/ibm_db2/functions/db2-fetch-assoc.xml:1.2 phpdoc/en/reference/ibm_db2/functions/db2-fetch-assoc.xml:1.3 --- phpdoc/en/reference/ibm_db2/functions/db2-fetch-assoc.xml:1.2 Sat Apr 16 22:50:00 2005 +++ phpdoc/en/reference/ibm_db2/functions/db2-fetch-assoc.xml Fri Apr 29 10:26:06 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. --> <refentry id="function.db2-fetch-assoc"> <refnamediv> @@ -136,6 +136,7 @@ <simplelist> <member><function>db2_fetch_both</function></member> <member><function>db2_fetch_into</function></member> + <member><function>db2_fetch_object</function></member> <member><function>db2_fetch_row</function></member> <member><function>db2_result</function></member> </simplelist> http://cvs.php.net/diff.php/phpdoc/en/reference/ibm_db2/functions/db2-fetch-both.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/ibm_db2/functions/db2-fetch-both.xml diff -u phpdoc/en/reference/ibm_db2/functions/db2-fetch-both.xml:1.2 phpdoc/en/reference/ibm_db2/functions/db2-fetch-both.xml:1.3 --- phpdoc/en/reference/ibm_db2/functions/db2-fetch-both.xml:1.2 Sat Apr 16 22:50:00 2005 +++ phpdoc/en/reference/ibm_db2/functions/db2-fetch-both.xml Fri Apr 29 10:26:06 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. --> <refentry id="function.db2-fetch-both"> <refnamediv> @@ -143,6 +143,7 @@ <simplelist> <member><function>db2_fetch_assoc</function></member> <member><function>db2_fetch_into</function></member> + <member><function>db2_fetch_object</function></member> <member><function>db2_fetch_row</function></member> <member><function>db2_result</function></member> </simplelist> http://cvs.php.net/diff.php/phpdoc/en/reference/ibm_db2/functions/db2-fetch-into.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/ibm_db2/functions/db2-fetch-into.xml diff -u phpdoc/en/reference/ibm_db2/functions/db2-fetch-into.xml:1.2 phpdoc/en/reference/ibm_db2/functions/db2-fetch-into.xml:1.3 --- phpdoc/en/reference/ibm_db2/functions/db2-fetch-into.xml:1.2 Sat Apr 16 22:50:00 2005 +++ phpdoc/en/reference/ibm_db2/functions/db2-fetch-into.xml Fri Apr 29 10:26:06 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. --> <refentry id="function.db2-fetch-into"> <refnamediv> @@ -136,6 +136,7 @@ <simplelist> <member><function>db2_fetch_assoc</function></member> <member><function>db2_fetch_both</function></member> + <member><function>db2_fetch_object</function></member> <member><function>db2_fetch_row</function></member> <member><function>db2_result</function></member> </simplelist> http://cvs.php.net/diff.php/phpdoc/en/reference/ibm_db2/functions/db2-fetch-row.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/ibm_db2/functions/db2-fetch-row.xml diff -u phpdoc/en/reference/ibm_db2/functions/db2-fetch-row.xml:1.2 phpdoc/en/reference/ibm_db2/functions/db2-fetch-row.xml:1.3 --- phpdoc/en/reference/ibm_db2/functions/db2-fetch-row.xml:1.2 Wed Apr 13 20:42:42 2005 +++ phpdoc/en/reference/ibm_db2/functions/db2-fetch-row.xml Fri Apr 29 10:26:06 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. --> <refentry id="function.db2-fetch-row"> <refnamediv> @@ -112,6 +112,7 @@ <member><function>db2_fetch_assoc</function></member> <member><function>db2_fetch_both</function></member> <member><function>db2_fetch_into</function></member> + <member><function>db2_fetch_object</function></member> <member><function>db2_result</function></member> </simplelist> </para> http://cvs.php.net/diff.php/phpdoc/en/reference/ibm_db2/functions/db2-result.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/ibm_db2/functions/db2-result.xml diff -u phpdoc/en/reference/ibm_db2/functions/db2-result.xml:1.2 phpdoc/en/reference/ibm_db2/functions/db2-result.xml:1.3 --- phpdoc/en/reference/ibm_db2/functions/db2-result.xml:1.2 Wed Apr 13 20:42:43 2005 +++ phpdoc/en/reference/ibm_db2/functions/db2-result.xml Fri Apr 29 10:26:06 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. --> <refentry id="function.db2-result"> <refnamediv> @@ -100,6 +100,10 @@ &reftitle.seealso; <para> <simplelist> + <member><function>db2_fetch_assoc</function></member> + <member><function>db2_fetch_both</function></member> + <member><function>db2_fetch_into</function></member> + <member><function>db2_fetch_object</function></member> <member><function>db2_fetch_row</function></member> </simplelist> </para> http://cvs.php.net/co.php/phpdoc/en/reference/ibm_db2/functions/db2-fetch-object.xml?r=1.1&p=1 Index: phpdoc/en/reference/ibm_db2/functions/db2-fetch-object.xml +++ phpdoc/en/reference/ibm_db2/functions/db2-fetch-object.xml <?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.db2-fetch-object"> <refnamediv> <refname>db2_fetch_object</refname> <refpurpose> Returns an object with properties representing columns in the fetched row </refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>object</type><methodname>db2_fetch_object</methodname> <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>row_number</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> Returns an object in which each property represents a column returned in the row fetched from a result set. </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>stmt</parameter></term> <listitem> <para> A valid <literal>stmt</literal> resource containing a result set. </para> </listitem> </varlistentry> <varlistentry> <term><parameter>row_number</parameter></term> <listitem> <para> Requests a specific 1-indexed row from the result set. Passing this parameter results in a PHP warning if the result set uses a forward-only cursor. </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> Returns an object representing a single row in the result set. The properties of the object map to the names of the columns in the result set. </para> <para> The IBM DB2, Cloudscape, and Apache Derby database servers typically fold column names to upper-case, so the object properties will reflect that case. </para> <para> If your SELECT statement calls a scalar function to modify the value of a column, the database servers return the column number as the name of the column in the result set. If you prefer a more descriptive column name and object property, you can use the AS clause to assign a name to the column in the result set. </para> <para> Returns &false; if no row was retrieved. </para> </refsect1> <refsect1 role="examples"> &reftitle.examples; <para> <example> <title>A <function>db2_fetch_object</function> example</title> <para> The following example issues a SELECT statement with a scalar function, RTRIM, that removes whitespace from the end of the column. Rather than creating an object with the properties "BREED" and "2", we use the AS clause in the SELECT statement to assign the name "name" to the modified column. The database server folds the column names to upper-case, resulting in an object with the properties "BREED" and "NAME". </para> <programlisting role="php"> <![CDATA[ <?php $conn = db2_connect($database, $user, $password); $sql = "SELECT breed, RTRIM(name) AS name FROM animals WHERE id = ?"; if ($conn) { $stmt = db2_prepare($conn, $sql); db2_execute($stmt, array(0)); while ($pet = db2_fetch_object($stmt)) { echo "Come here, {$pet->NAME}, my little {$pet->BREED}!"; } db2_close($conn); } ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Come here, Pook, my little cat! ]]> </screen> </example> </para> </refsect1> <refsect1 role="seealso"> &reftitle.seealso; <para> <simplelist> <member><function>db2_fetch_assoc</function></member> <member><function>db2_fetch_both</function></member> <member><function>db2_fetch_into</function></member> <member><function>db2_fetch_row</function></member> <member><function>db2_result</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 -->