|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34625 Scrollable cursor doesn't work with MySQL
Submitted: 2005-09-24 06:35 UTC Modified: 2005-10-12 20:08 UTC
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:0 (0.0%)
From: stewey at ambitious dot ca Assigned: wez (profile)
Status: Not a bug Package: PDO related
PHP Version: 5CVS-2005-09-25 (snap) OS: Mac OS X 10.4.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: stewey at ambitious dot ca
New email:
PHP Version: OS:


 [2005-09-24 06:35 UTC] stewey at ambitious dot ca
Preparing a statement with the PDO_ATTR_CURSOR => 
PDO_CURSOR_SCROLL driver option doesn't work with MySQL.

Reproduce code:
$PDO = new PDO(  
	'user', 'pass' );
$statement = $PDO->prepare("select id from table", 
print_r($statement->fetch( PDO_FETCH_ASSOC,  
print_r($statement->fetch( PDO_FETCH_ASSOC, 

Expected result:
I would expect to see the same row output twice. If this is 
not a support driver option, then I would expect and error or 
exception thrown (yes, exceptions are enabled).

Actual result:
Two different rows. The PDO_FETCH_ORI_ABS arguments are 
seemingly ignored.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-24 13:36 UTC]
Please try using this CVS snapshot:
For Windows:

 [2005-09-24 23:46 UTC] stewey at ambitious dot ca
Thanks for the info. Constant problem resolved, but the 
scrollable cursor problem remains. New repro code:

$PDO = new PDO(  
	'user', 'pass' );
$statement = $PDO->prepare("select id from table", 
print_r($statement->fetch( PDO::FETCH_ASSOC,  
   PDO::FETCH_ORI_ABS, 1 ));
print_r($statement->fetch( PDO::FETCH_ASSOC, 
   PDO::FETCH_ORI_ABS, 1 ));
 [2005-10-12 14:36 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

MySQL does not support cursors and the driver cannot emulate them for you.
 [2005-10-12 20:08 UTC] stewey at ambitious dot ca
Ok. Perhaps you should throw an exception when we give a 
cursor attribute to a mysql pdo driver. This should also be 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 14 23:01:27 2024 UTC