Which MySQL Datatype to use for storing boolean values from/to PHP?
- by Beat
Since MySQL doesn't seem to have any 'boolean' datatype, which datatype do you 'abuse' for storing true/false information in MySQL? Especially in the context of writing and reading from/to a PHP-Script.
Over time I have used and seen several approaches:
tinyint, varchar fields containing the values 0/1,
varchar fields containing the strings…