#40489 [Opn->Csd]: Invalid example 1681. Fetching rows with a scrollable cursor
| From: | vrana@php.net | Date: | Fri, 23 Mar 2007 16:59:35 +0000 |
| Subject: | #40489 [Opn->Csd]: Invalid example 1681. Fetching rows with a scrollable cursor | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969375860@lists.php.net to get a copy of this message | ||
ID: 40489
Updated by: vrana@php.net
Reported By: baldurien at bbnwn dot eu
-Status: Open
+Status: Closed
Bug Type: Documentation problem
PHP Version: Irrelevant
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2007-02-14 23:54:30] baldurien at bbnwn dot eu
Description:
------------
In the example 1681 (here:
http://www.php.net/manual/en/function.PDOStatement-fetch.php)
we can
read this :
$stmt = $dbh->prepare($sql, array(PDO::ATTR_CURSOR,
PDO::CURSOR_SCROLL));
[later in the example]
$stmt = $dbh->prepare($sql, array(PDO::ATTR_CURSOR,
PDO::CURSOR_SCROLL));
But the doc for PDO::prepare() (here:
http://www.php.net/manual/en/function.PDO-prepare.php
) says :
driver_options
"This array holds one or more key=>value pairs to set attribute values
for the PDOStatement object that this method returns. You would most
commonly use this to set the PDO::ATTR_CURSOR value to
PDO::CURSOR_SCROLL to request a scrollable cursor. Some drivers have
driver specific options that may be set at prepare-time."
Thus, it should be for the two lines.
$stmt = $dbh->prepare($sql, array(PDO::ATTR_CURSOR =>
PDO::CURSOR_SCROLL));
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40489&edit=1