bool?
11May08
Something that was causing me grief today was the boolean data type in phpmyadmin. I was trying to create a table field using the BOOLÂ and every time I thought I succeeded in doing so phpmyadmin would change it to TINYINT. bah.
Well, it seems using a true or false is fine when constructing a query but when creating a table, according to random poster here:
“in mySQL, there really is no boolean field type. BIT, BOOL and BOOLEAN are simply synonyms for TINYINT(1). A value of zero is considered false. Non-zero values are considered true.”
Which also explained why phpmyadmin was throwing an error why i tried to set the default value of the field to “FALSE”. I set it to 0 and everything works fine.
Filed under: Uncategorized | Leave a Comment
No Responses Yet to “bool?”