Bug #42474 [Opn->Wfx]: mssql_fetch_* returns 0 instead of NULL when a bit field is NULL
| From: | kalle@php.net | Date: | Sat, 15 Oct 2016 23:11:16 +0000 |
| Subject: | Bug #42474 [Opn->Wfx]: mssql_fetch_* returns 0 instead of NULL when a bit field is NULL | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-204799@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=42474&edit=1
ID: 42474
Updated by: kalle@php.net
Reported by: jpittman2 at gmail dot com
Summary: mssql_fetch_* returns 0 instead of NULL when a bit
field is NULL
-Status: Open
+Status: Wont fix
Type: Bug
Package: MSSQL related
Operating System: Windows 2003 (5.2)
PHP Version: 5.2.3
Block user comment: N
Private report: N
New Comment:
With MSSQL being removed from PHP as of PHP7.0, and ext/mssql not having a maintainer, I'm
gonna close this report as a Won't fix, until maybe one day it will find a new maintainer.
Alternatively you can use sqlsrv from Microsoft if you are on Windows, or pdo_dblib if you are on
Unix.
Previous Comments:
------------------------------------------------------------------------
[2007-08-29 17:47:58] jpittman2 at gmail dot com
Description:
------------
mssql_fetch_* returns 0 instead of NULL when the datatype is "bit".
Reproduce code:
---------------
<?php
$conn = mssql_connect($src, $uid, $pwd);
mssql_select_db($db_name);
$sql = "SELECT Cast (Null as Bit) As Should_Be_Null,"
. " Cast (0 as Bit) AS Should_Be_Int_0,"
. " Cast (1 as Bit) As Should_Be_Int_1";
$result = mssql_query($sql);
return mssql_fetch_array($result);
?>
Expected result:
----------------
Should return (NULL, 0, 1)
Actual result:
--------------
returns (0, 0, 1)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=42474&edit=1