Bug #39267 [Asn->Opn]: mssql_fetch_object bit error null value
| From: | kalle@php.net | Date: | Mon, 29 Dec 2014 01:05:53 +0000 |
| Subject: | Bug #39267 [Asn->Opn]: mssql_fetch_object bit error null value | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-189287@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: Assigned
+Status: Open
Type: Bug
Package: MSSQL related
Operating System: Windows 2003 Server
PHP Version: 5.1.6
-Assigned To: fmk
+Assigned To:
Block user comment: N
Private report: N
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