I am storing x and y as bits in mysql database, upon fetch the record using php fetch_assoc, the display is gobbled. And I can't find a way to test the value to see if it's true or false... I tried using if($val), if($val==true) if($val===true), if $val is false, all 3 tests still returns true. any idea? [x] => � [y] =>
thanks for the answer below, I now use:
function mysql_bit($bit) { if(ord($bit) == 0 || ord($bit) == 48)return false; return true; }
to handle both mysql bit value and regular string/int value(from http request for example).