+ 5

Does MySQL driver support cursors?

Can I use cursors in MySQL driver? Does the code following work in it (written using PDO)? $dbConnection->prepare('SELECT * FROM `table`', [PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL]);

15th Jul 2017, 3:56 PM
$machitgarha
$machitgarha - avatar
3 Réponses
+ 4
Thank you Dayve for your links. Currently, MySQL doesn't support cursors; as mentioned in notes: http://php.net/manual/en/pdostatement.fetch.php#105277 http://php.net/manual/en/pdostatement.fetch.php#114458
21st Jul 2017, 6:28 PM
$machitgarha
$machitgarha - avatar
+ 13
@Mohammad Amin Chitgarha : Oops...tbh, I was not aware of this. Thanks a lot for correcting me. :))
21st Jul 2017, 6:40 PM
Dev
Dev - avatar
+ 12
Maybe it does! Check these out : • http://php.net/manual/en/pdostatement.fetch.phphttp://php.net/manual/en/book.pdo.php Edit :- Seems like it's not supported in the MySQL driver =]
21st Jul 2017, 3:42 PM
Dev
Dev - avatar