For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > September 2006 > #38922 [Opn->Csd]: Undefined class constant 'ATTR_DEFAULT_FETCH_MODE'









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author #38922 [Opn->Csd]: Undefined class constant 'ATTR_DEFAULT_FETCH_MODE'
bjori@php.net

2006-09-22, 7:57 am

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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com