Not sure if there are still people who are looking for explanations and solutions. The comments above say all about the differences between TRUE / FALSE / 1/0.
I just would like to bring my 2 cents for the way the actual value is displayed.
BOOLEAN
If you are working with a logical data type, you are looking for the result TRUE or FALSE; if you store it in MySQL, it will be stored as 1 resp. 0 (if I'm not mistaken, this is the same in the memory of your server).
Thus, in order to display the value in PHP, you need to check whether it is true (1) or false (0), and display everything you want: TRUE or FALSE or, possibly, 1 or 0 ".
Attention, anything that is larger (or different) from 0 will also be considered TRUE in PHP. For example: 2, "abc", etc. Will return TRUE.
BIT, TINTINT
If you are working with a numeric data type, the way it is stored is the same.
To display a value, you must tell PHP to treat it as a number. The easiest way I've found is to multiply it by 1.
Alex Tanner Feb 17 '19 at 19:55 2019-02-17 19:55
source share