I am new to PHP.
I have written a code to check whether a Bit column's value is 1 or 0.
But i am not yet successful to implemnet this check. i.e with any code that i have written for this purpsoe, i am not able to get whethere the value retrieved from the column (of Bit data type) is TRUE of FALSE.
Though in my table (MySql db), the column has 1 for some records and sometime it contains 0.
It looks simple but really has become a hard nut to crack for me
Here is a bit of code to understand you my point:
-------------------------------------------------------
$myItems = $db->Execute_DataSet_Query($myQuery); /* this methods retrieves data from db
foreach($myItems as $myItem)
{
if($myItem['GetCodeOpenSite'] == true) /* GetCodeOpenSite is the column name and has Bit data type*/
{
//code to execute when true
}
else
{
//code to execute when false
}
}
-------------------------------------------------
Please help me to find the solution
thanks in advance