Bug #39267 [Opn->Wfx]: mssql_fetch_object bit error null value
| From: | kalle@php.net | Date: | Sat, 15 Oct 2016 23:08:04 +0000 |
| Subject: | Bug #39267 [Opn->Wfx]: mssql_fetch_object bit error null value | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-204794@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=39267&edit=1
ID: 39267
Updated by: kalle@php.net
Reported by: renatobanzai at gmail dot com
Summary: mssql_fetch_object bit error null value
-Status: Open
+Status: Wont fix
Type: Bug
Package: MSSQL related
Operating System: Windows 2003 Server
PHP Version: 5.1.6
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:
------------------------------------------------------------------------
[2008-10-19 00:28:31] antoniadonoso at msn dot com
i have the same problem, my php version is 5.2.6 ans MSSQL 2000.
I see that the problem is mssql_fetch_array, mssql_fetch_row and mssql_fetch_object. When you have
a bit variable with null value those functions retuns cero, not NULL.
My problem has been resolved as simple sql query before a complete sql query final. by example.
$query="select * from table where column = '$column' and Bit_Column is NULL ";
$qt=mssql_query($query,$dbhandle);
if (mssql_rows_affected($dbhandle) <> 1)
{
header("Location: resumen.php");
}
Simple, but effective.
Regards Antonia.
------------------------------------------------------------------------
[2006-10-26 15:51:54] renatobanzai at gmail dot com
Description:
------------
When I use the mssql_fetch_object() function with a bit column, if the column has NULL value, the
function returns 0.
Expected result:
----------------
I think the mssql_fetch_object function must returns null value (empty value, same numeric columns
when null the function returns "")
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=39267&edit=1