Boolean conversion

Added platform specific conversion form database Boolean type to PHP bool type
+1, when the to database conversion is platform specific, the to php version should also be platform specific.