cvs: peardoc /en/package/database/db intro-fetch.xml
| From: | Daniel Convissor | Date: | Fri, 16 Apr 2004 18:38:53 +0000 |
| Subject: | cvs: peardoc /en/package/database/db intro-fetch.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-3561@lists.php.net to get a copy of this message | ||
danielc Fri Apr 16 14:38:53 2004 EDT
Modified files:
/peardoc/en/package/database/db intro-fetch.xml
Log:
Refine and rename overview section.
http://cvs.php.net/diff.php/peardoc/en/package/database/db/intro-fetch.xml?r1=1.28&r2=1.29&ty=u
Index: peardoc/en/package/database/db/intro-fetch.xml
diff -u peardoc/en/package/database/db/intro-fetch.xml:1.28
peardoc/en/package/database/db/intro-fetch.xml:1.29
--- peardoc/en/package/database/db/intro-fetch.xml:1.28 Fri Apr 16 13:38:44 2004
+++ peardoc/en/package/database/db/intro-fetch.xml Fri Apr 16 14:38:53 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
-<!-- $Revision: 1.28 $ -->
+<!-- $Revision: 1.29 $ -->
<refentry id="package.database.db.intro-fetch">
<refnamediv>
@@ -10,25 +10,32 @@
<refsect1 id="package.database.db.intro-fetch.desc">
&title.desc;
- <refsect2 id="package.database.db.intro-fetch.desc.overview">
- <title>Overview of Fetch Functions</title>
- <simpara>
+ <refsect2 id="package.database.db.intro-fetch.desc.fetching">
+ <title>Fetching Rows From Query Results</title>
+ <para>
The &class.db-result; object provides two
- functions to fetch rows: <function>fetchRow</function> and
- <link linkend="package.database.db.db-result.fetchinto">
- <function>fetchInto</function></link>.
+ methods for fetch rows:
<link linkend="package.database.db.db-result.fetchrow">
- <function>fetchRow</function></link>
- returns the row, &null; on no more data or a
- <link linkend="package.database.db.db-error">
- &class.db-error;</link>, when an error occurs.
+ <function>fetchRow</function></link> and
<link linkend="package.database.db.db-result.fetchinto">
- <function>fetchInto</function></link> requires a variable, which be will
- directly assigned by reference to the result row. It will return
- &null; when result set is empty or a
- <link linkend="package.database.db.db-error">
- &class.db-error;</link> too.
- </simpara>
+ <function>fetchInto</function></link>.
+ </para>
+ <para>
+ <function>fetchRow</function></link> returns the row's
+ data.
+ <function>fetchInto</function></link> assigns the row's
+ data by reference to a variable you provide and returns
+ &constant.db-ok;
+ </para>
+ <para>
+ The result pointer gets moved to the next row each
+ time these methods are called. &null; is returned
+ when the end of the result set is reached.
+ </para>
+ <para>
+ &class.db-error; is returned if an error is encountered.
+ </para>
+
<example>
<title>Fetching a result set</title>
<programlisting role="php">