cvs: peardoc /en/package/database/db intro-fetch.xml
| From: | Daniel Convissor | Date: | Sat, 22 May 2004 22:02:07 +0000 |
| Subject: | cvs: peardoc /en/package/database/db intro-fetch.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-4069@lists.php.net to get a copy of this message | ||
danielc Sat May 22 18:02:07 2004 EDT
Modified files:
/peardoc/en/package/database/db intro-fetch.xml
Log:
Put comment onto one line. Comment out second example since if someone tried it they wouldn't
get anything since the result set had already been looped through.
http://cvs.php.net/diff.php/peardoc/en/package/database/db/intro-fetch.xml?r1=1.45&r2=1.46&ty=u
Index: peardoc/en/package/database/db/intro-fetch.xml
diff -u peardoc/en/package/database/db/intro-fetch.xml:1.45
peardoc/en/package/database/db/intro-fetch.xml:1.46
--- peardoc/en/package/database/db/intro-fetch.xml:1.45 Sat May 22 17:27:23 2004
+++ peardoc/en/package/database/db/intro-fetch.xml Sat May 22 18:02:06 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
-<!-- $Revision: 1.45 $ -->
+<!-- $Revision: 1.46 $ -->
<refentry id="package.database.db.intro-fetch">
<refnamediv>
@@ -54,18 +54,15 @@
// Get each row of data on each iteration until
// there are no more rows
while ($row =& $res->fetchRow()) {
- // Assuming DB's default fetchmode is
- // DB_FETCHMODE_ORDERED
+ // Assuming DB's default fetchmode is DB_FETCHMODE_ORDERED
echo $row[0] . "\n";
}
-// Or:
-// an example using fetchInto()
-while ($res->fetchInto($row)) {
- // Assuming DB's default fetchmode is
- // DB_FETCHMODE_ORDERED
- echo $row[0] . "\n";
-}
+// Or, you could have done the same thing using fetchInto()
+// while ($res->fetchInto($row)) {
+// // Assuming DB's default fetchmode is DB_FETCHMODE_ORDERED
+// echo $row[0] . "\n";
+// }
?>
]]>
</programlisting>