PHP and MySQL 5 bit fields
I was returning a query with some bit fields into my class but the it was not returning true or false when I switched the data.
A bit of hunting and it turned out the that it was being returned as a binary type and after a few failed attempts to convert it to an integer or boolean on the PHP side I found this bug report on it.
So the moral of the story is if you are selecting BIT types from a mysql DB in PHP don't do this:
FROM tbl_example
WHERE id = 1
Instead cast the bit to an integer in MySQL like so:
FROM tbl_example
WHERE id = 1
Voila, it works like expected.
Cheers, Mark Lynch




Good luck!