Req #44541 [Opn->Wfx]: new feature in PDOStatement::fetchAll()

From: Date: Tue, 25 Oct 2022 14:41:00 +0000
Subject: Req #44541 [Opn->Wfx]: new feature in PDOStatement::fetchAll()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-242682@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=44541&edit=1 ID: 44541 Updated by: cmb@php.net Reported by: 007NOT at gmail dot com Summary: new feature in PDOStatement::fetchAll() -Status: Open +Status: Wont fix Type: Feature/Change Request Package: PDO related Operating System: * PHP Version: 5.2.5 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2010-11-15 15:17:03] jinmoku at hotmail dot com I agreed, I tried with fetchAll(PDO::FETCH_CLASS, 'PDORow'), but it don't work too :( ------------------------------------------------------------------------ [2008-03-26 20:27:34] 007NOT at gmail dot com Description: ------------ >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 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=44541&edit=1

« previous php.bugs (#242682) next »