cvs: peardoc /en/package/database/db intro-fetch.xml

From: Date: Fri, 16 Apr 2004 18:41:32 +0000
Subject: cvs: peardoc /en/package/database/db intro-fetch.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-3562@lists.php.net to get a copy of this message
danielc Fri Apr 16 14:41:32 2004 EDT Modified files: /peardoc/en/package/database/db intro-fetch.xml Log: Clean up example. http://cvs.php.net/diff.php/peardoc/en/package/database/db/intro-fetch.xml?r1=1.29&r2=1.30&ty=u Index: peardoc/en/package/database/db/intro-fetch.xml diff -u peardoc/en/package/database/db/intro-fetch.xml:1.29 peardoc/en/package/database/db/intro-fetch.xml:1.30 --- peardoc/en/package/database/db/intro-fetch.xml:1.29 Fri Apr 16 14:38:53 2004 +++ peardoc/en/package/database/db/intro-fetch.xml Fri Apr 16 14:41:32 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.29 $ --> +<!-- $Revision: 1.30 $ --> <refentry id="package.database.db.intro-fetch"> <refnamediv> @@ -36,10 +36,10 @@ &class.db-error; is returned if an error is encountered. </para> - <example> - <title>Fetching a result set</title> - <programlisting role="php"> - <![CDATA[ + <example> + <title>Fetching a result set</title> + <programlisting role="php"> + <![CDATA[ <?php // Create a valid DB object named $db // at the beginning of your program... @@ -56,12 +56,16 @@ // 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 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"; } ?>

« previous php.pear.doc (#3562) next »