ID: 39267 Comment by: antoniadonoso at msn dot com Reported By: renatobanzai at gmail dot com Status: Assigned Bug Type: MSSQL related Operating System: Windows 2003 Server PHP Version: 5.1.6 Assigned To: fmk New Comment:
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. Previous Comments: ------------------------------------------------------------------------ [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 http://bugs.php.net/?id=39267&edit=1