Req #56436 [Sus]: Allow PDO class to set defaut PDOStatement::Fetch mode
| From: | mike@php.net | Date: | Thu, 02 Jan 2014 15:53:25 +0000 |
| Subject: | Req #56436 [Sus]: Allow PDO class to set defaut PDOStatement::Fetch mode | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-183550@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=56436&edit=1
ID: 56436
Updated by: mike@php.net
Reported by: php dot net at sharpdreams dot com
Summary: Allow PDO class to set defaut PDOStatement::Fetch
mode
Status: Suspended
Type: Feature/Change Request
-Package: PDO
+Package: *General Issues
Operating System: *
PHP Version: 5_1 CVS-2005-07-02 (dev)
Assigned To: helly
Block user comment: N
Private report: N
New Comment:
Dupe of closed bug #34909.
Previous Comments:
------------------------------------------------------------------------
[2005-10-19 08:44:37] akorthaus at web dot de
There is another bug in the php bug-tracker, with more detailed information and a first patch to
implement a PDO::setDefaultFetchMode() methode (incomplete):
http://bugs.php.net/bug.php?id=34909
------------------------------------------------------------------------
[2005-09-01 09:28:52] akorthaus at web dot de
This is the only problem which prevents many people from using PDO itself.
If you have 20 queries in one script and you don't use the default FetchMode, hardcoded in the
PDO source, you have to spread 20 PDOStatement::setFetchMode() calls all over your code, which could
be easily avoided if it was possible to set the default-FetchMode once in the script.
Or do you think everybody using PDO must use a wrapper-class?
------------------------------------------------------------------------
[2005-08-30 23:25:02] wez@php.net
Won't be in 5.1, and quite possibly won't be implemented at all.
------------------------------------------------------------------------
[2005-08-03 10:42:58] akorthaus at web dot de
I second that.
If not an implementing an extra function, one could implement an attribute to use with
PDO::setAttribute (I'd prefer a function).
------------------------------------------------------------------------
[2005-07-02 18:04:35] php dot net at sharpdreams dot com
Description:
------------
The PDO class ought to have a "setDefaultFetchMode()" function that when called, sets all
subsequent PDOStatements to have that fetch mode.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=56436&edit=1