ID: 42474 Updated by: [EMAIL PROTECTED] Reported By: jpittman2 at gmail dot com -Status: Open +Status: Assigned Bug Type: MSSQL related Operating System: Windows 2003 (5.2) PHP Version: 5.2.3 -Assigned To: +Assigned To: fmk
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 http://bugs.php.net/?id=42474&edit=1