|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-10-26 15:51 UTC] 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 "") PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
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.