ID: 44475
Updated by: [EMAIL PROTECTED]
Reported By: alexmehal at gmail dot com
-Status: Open
+Status: Wont fix
Bug Type: PDO related
Operating System: Windows XP
PHP Version: 5.2.5
New Comment:
Thanks for the hint! Currently its not planned to add support for
cursor features to PDO_MYSQL or PDO_MYSQLND. However, feel free to
provide a patch.
Previous Comments:
------------------------------------------------------------------------
[2008-03-18 22:55:33] alexmehal at gmail dot com
Description:
------------
I'm trying to use different types of cursor orientations. Even example
from official manual does not work.
Reproduce code:
---------------
$dsn = 'mysql:dbname=...';
$dbh = new PDO($dsn, $user, $password);
$sql = "SELECT * FROM genres WHERE 1 ORDER BY id";
$stmt = $dbh->prepare($sql, array(PDO::ATTR_CURSOR =>
PDO::CURSOR_SCROLL));
$stmt->execute();
$row = $stmt->fetch(PDO::FETCH_NUM, PDO::FETCH_ORI_LAST);
do {
$data = $row[0] . "\t" . $row[1] . "\t" . $row[2] . "\n";
print $data;
} while ($row = $stmt->fetch(PDO::FETCH_NUM, PDO::FETCH_ORI_PRIOR));
$stmt = null;
Expected result:
----------------
3 Fighting
2 Arcade/Puzzle
1 Action/Adventure
Actual result:
--------------
1 Action/Adventure
2 Arcade/Puzzle
3 Fighting
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44475&edit=1