Q:

how can i capture null values from mssql_result?

I am running a query 
$Health = mssql_query("Select 
*
from
Health
where 
HEA_ID = '$HEA_ID'
");

and then capturing one of the fields here:
$HEA_DocsOnFile = mssql_result($Health,0,'HEA_DocsOnFile');

the field HEA_DocsOnFile is a bit in sql server
how do i know whether HEA_DocsOnFile is a NULL or a 0?
unfortunately mssql_result returns the same value for NULL and 0!
i've also tried:
$HEA_DocsOnFile = is_null(mssql_result($Health,0,'HEA_DocsOnFile')) ? null : mssql_result($Health,0,'HEA_DocsOnFile');

to make sure to set $HEA_DocsOnFile to null
and later to check a checkbox if it's 0 and NOT NULL this way:
<?php if($HEA_DocsOnFile===0)  { echo  'checked="checked"' ; }?>

even though it is indeed null (as sql server says at least), it still checks the checkbox thinking that it is 0
update
per marc's suggestion, i explicitly selected all the columns instead of doing select *
i did:
select
....
 ,[HEA_POLST]
      ,[HEA_MOST]
      ,[HEA_DNR]
      ,isnull(HEA_DocsOnFile,2) HEA_DocsOnFile
from...........

i know that HEA_DocsOnFile is now 2
however, when testing:
<?php if($HEA_DocsOnFile==1)  { echo  'checked="checked"' ; }?>

it actually checks the box!
what am i doing wrong?
i actually did a var_dump($HEA_DocsOnFile); and it returned int(1)
how can that be? it is NULL in sql server!!
i even did:
select............
    ,isnull(HEA_DocsOnFile,'2') HEA_DocsOnFile

to change the type from int to string and then did a var_dump and it STILL RETURNED int(1)

A:

I decided to cut my losses and just change the schema of that annoying field from bit to tinyint!

