Bug #68684 [Fbk->Opn]: driver returns false for NULL DATETIME column
| From: | lm at zork dot pl | Date: | Thu, 08 Apr 2021 21:29:37 +0000 |
| Subject: | Bug #68684 [Fbk->Opn]: driver returns false for NULL DATETIME column | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-233333@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68684&edit=1
ID: 68684
User updated by: lm at zork dot pl
Reported by: lm at zork dot pl
Summary: driver returns false for NULL DATETIME column
-Status: Feedback
+Status: Open
Type: Bug
Package: PDO MySQL
Operating System: All
PHP Version: 5.6.4
Block user comment: N
Private report: N
New Comment:
No chance, sorry. My last php project was about six years ago :-)
I think you can safely close this case.
Previous Comments:
------------------------------------------------------------------------
[2021-04-08 21:11:34] dharman@php.net
Unfortunately, I can't reproduce it with any of the currently available PHP versions. If you
are still encountering this issue with PHP 8 or even PHP 7.4 could you provide more details, please?
If possible please create a test case that we can copy and paste.
------------------------------------------------------------------------
[2014-12-29 12:41:53] lm at zork dot pl
Description:
------------
PDO mysql driver configured as in example returns false for DATETIME column. VARCHARS, INT and other
columns are returned properly (as php null value).
Test script:
---------------
$db = new PDO($dsn, $db_user, $db_pass);
$db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
//without this PDO returns all data as strings
$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68684&edit=1