#40489 [NEW]: Invalid example 1681. Fetching rows with a scrollable cursor
| From: | baldurien at bbnwn dot eu | Date: | Wed, 14 Feb 2007 23:54:30 +0000 |
| Subject: | #40489 [NEW]: Invalid example 1681. Fetching rows with a scrollable cursor | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969375479@lists.php.net to get a copy of this message | ||
From: baldurien at bbnwn dot eu
Operating system:
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: Invalid example 1681. Fetching rows with a scrollable cursor
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 bug report at http://bugs.php.net/?id=40489&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40489&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40489&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40489&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40489&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=40489&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40489&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40489&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40489&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40489&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40489&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=40489&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=40489&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40489&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40489&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40489&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40489&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40489&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40489&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40489&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40489&r=mysqlcfg