I\'m using a bit(1) field to store boolean values and writing into the table using PDO prepared statements.
This is the test table:
CREATE TABLE IF N
pdo by default doesnt use prepared statements for the mysql driver, it emulates them by creating dynamic sql behind the scenes for you. The sql sent to mysql ends up being a single quoted 0 like '0', which mysql interprets as a string, not a number.
$pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
It should work now, and you also will be actually using real prepared statements.