|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #44541 new feature in PDOStatement::fetchAll()
Submitted: 2008-03-26 20:27 UTC Modified: 2022-10-25 14:40 UTC
Avg. Score:3.8 ± 0.9
Reproduced:6 of 6 (100.0%)
Same Version:2 (33.3%)
Same OS:1 (16.7%)
From: 007NOT at gmail dot com Assigned: cmb (profile)
Status: Wont fix Package: PDO related
PHP Version: 5.2.5 OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: 007NOT at gmail dot com
New email:
PHP Version: OS:


 [2008-03-26 20:27 UTC] 007NOT at gmail dot com
>General error: PDO::FETCH_LAZY can't be used with PDOStatement::fetchAll()
It seems to me it will be usefull to have parameter fetch_style = PDO::FETCH_LAZY


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-15 15:17 UTC] jinmoku at hotmail dot com
I agreed, I tried with fetchAll(PDO::FETCH_CLASS, 'PDORow'), but it don't work too :(
 [2011-02-21 20:47 UTC]
-Package: Feature/Change Request +Package: PDO related -Operating System: +Operating System: *
 [2022-10-25 14:41 UTC]
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2022-10-25 14:41 UTC]
This cannot be implemented, because PDORow retrieves the column
values only when actually requested by the script, and if all rows
would have already been fetched, the columns of the last row would
be returned.  A more elaborate implementation which would navigate
the result set might be possible, if the driver supports
scrollable cursors, but it seems to me that many drivers don't,
and I doubt that it would actually be useful.  The whole point of
`FETCH_LAZY` is to keep memory consumption in the PHP process low,
and `::fetchAll()` already defeat that.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 16 00:01:27 2024 UTC