Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.5.0b5

Doc Bug #18759 User note that is a documentation problem
Submitted: 2011-08-25 05:41 UTC Modified: 2014-12-14 10:09 UTC
From: doconnor Assigned: danielc
Status: Closed Package: MDB2
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: 2.5.0b4    
Subscription  


 [2011-08-25 05:41 UTC] doconnor (Daniel O'Connor)
Manual page: package.database.mdb2.intro-fetch.php Note submitter: bill at billgrady dot com rowCount() example is wrong?\r\n\r\n<code><span style=\"color: #000000\">\n<span style=\"color: #0000BB\"><?php\r</span><span style=\"color: #FF8000\">//?Once?you?have?a?valid?MDB2?object?named?$mdb2...\r</span><span style=\"color: #0000BB\">$res?</span><span style=\"color: #007700\">=&?</span><span style=\"color: #0000BB\">$mdb2</span><span style=\"color: #007700\">-></span><span style=\"color: #0000BB\">query</span><span style=\"color: #007700\">(</span><span style=\"color: #DD0000\">\'SELECT?*?FROM?phptest\'</span><span style=\"color: #007700\">);\r</span><span style=\"color: #0000BB\">$res</span><span style=\"color: #007700\">-></span><span style=\"color: #0000BB\">fetchRow</span><span style=\"color: #007700\">();\r</span><span style=\"color: #FF8000\">//?returns?2?if?the?result?set?contains?at?least?2?rows\r</span><span style=\"color: #007700\">echo?</span><span style=\"color: #0000BB\">$res</span><span style=\"color: #007700\">-></span><span style=\"color: #0000BB\">rowCount</span><span style=\"color: #007700\">();\r\r</span><span style=\"color: #0000BB\">?></span>\n</span>\n</code>\r\n\r\nthis:\r\n $res->fetchRow();\r\n\r\nshould be:\r\n $res->fetchAll();\r\n\r\n\r\nA simple mistake that might confuse the novice.

Comments

 [2011-12-20 04:56 UTC] danielc (Daniel Convissor)
-Status: Open +Status: Closed -Assigned To: +Assigned To: danielc
I don't see that comment at http://pear.php.net/manual/en/package.database.mdb2.intro-fetch.php. Guess someone else deleted it.
 [2014-12-14 10:09 UTC] garrettw (Garrett Whitehorn)
You won't see the comment on that page, because it was turned into this doc bug. This is the only place it exists now.