PDO_MySQL does not support cursors
Open
Nobody has claimed this yet.
bug
Extension: pdo
- Dominant language
- XML
- Stars
- 596
- Forks
- 890
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 55
Description
Description
For example, I have a table with two fields: id and value. I inserted nearly 100k rows into this table.
I want to use the scrollable cursor. I wrote the following code:
$sql = 'SELECT id FROM cursor_ test;';
$stmt = $dbh->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));
$stmt ->Execute ();
$row = $stmt->fetch(PDO::FETCH_ASSOC, PDO::FETCH_ORI_ABS, 3);
var_ dump($row['id']); // 1, the expected value is 3
What did I do wrong?
PHP Version
PHP5.6.25
Operating System
window7
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the PDO_MySQL documentation for PDO::ATTR_CURSOR, PDO::CURSOR_SCROLL, and PDOStatement::fetch(), using the reported SQL and fetch call as the reproduction. Clarify whether scrollable cursors are supported and what the example should expect; done means the documented behavior answers the reporter's question.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100