note 89030 added to pdostatement.nextrowset

From: Date: Wed, 18 Feb 2009 20:11:33 +0000
Subject: note 89030 added to pdostatement.nextrowset
Groups: php.notes 
Request: Send a blank email to php-notes+get-150816@lists.php.net to get a copy of this message
Just want to point out one thing that I think mistake. According to you reference, fetch method of statement class fetch a row. not a resultset. So it is wrong to use that method in above example when you intention is to retrieve resultset. It should be fetchAll. Here's the snippet of code which I'm referring to. [Quote] do { $rowset = $stmt->fetch(PDO::FETCH_NUM); if ($rowset) { printResultSet($rowset, $i); } $i++; [/Quote] ---- Server IP: 216.235.13.26 Probable Submitter: 66.51.250.199 ---- Manual Page -- http://www.php.net/manual/en/pdostatement.nextrowset.php Edit -- https://master.php.net/note/edit/89030 Del: integrated -- https://master.php.net/note/delete/89030/integrated Del: useless -- https://master.php.net/note/delete/89030/useless Del: bad code -- https://master.php.net/note/delete/89030/bad+code Del: spam -- https://master.php.net/note/delete/89030/spam Del: non-english -- https://master.php.net/note/delete/89030/non-english Del: in docs -- https://master.php.net/note/delete/89030/in+docs Del: other reasons-- https://master.php.net/note/delete/89030 Reject -- https://master.php.net/note/reject/89030 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#150816) next »