#38922 [Opn->Csd]: Undefined class constant 'ATTR_DEFAULT_FETCH_MODE'

From: Date: Fri, 22 Sep 2006 11:59:17 +0000
Subject: #38922 [Opn->Csd]: Undefined class constant 'ATTR_DEFAULT_FETCH_MODE'
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969374073@lists.php.net to get a copy of this message
ID: 38922 Updated by: bjori@php.net Reported By: cogo at starzinger dot net -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: Linux-2.6.17 PHP Version: 5.1.6 -Assigned To: +Assigned To: bjori New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2006-09-22 11:54:40] bjori@php.net Reclassified. PDO::ATTR_DEFAULT_FETCH_MODE will be available as of 5.2.0 ------------------------------------------------------------------------ [2006-09-22 09:42:30] cogo at starzinger dot net Description: ------------ I am trying to set a default fetch mode using the PDO::ATTR_DEFAULT_FETCH_MODE as mentioned on http://www.php.net/pdo. Trying to do this results in the error: Undefined class constant 'ATTR_DEFAULT_FETCH_MODE' Hopefully my code is correct. ;) Reproduce code: --------------- $pdo = new PDO('mysql:host=host;dbname=db', 'user', 'password', array( PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC )); Expected result: ---------------- I expect the code to connect to the mysql database and set FETCH_ASSOC as the default fetch mode. Actual result: -------------- Fatal error: Undefined class constant 'ATTR_DEFAULT_FETCH_MODE' in /path/to/my/script.php on line... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38922&edit=1

« previous php.doc (#969374073) next »