DEV Community

Discussion on: Storing booleans in mySql database as integers/boolean/text for true and false?

 
marissab profile image
Marissa B

There's no need to do that if you're checking on a situation like whether a checkbox is checked.

If your process involves a user manually entering the words true/false/0/1/etc and you're not validating it before using it on the backend.... That's a big problem for introducing weird issues.

Flipping whatever the checkbox state is into the words true/false to save somewhere should be one line in most languages.

Thread Thread
 
dgloriaweb profile image
dgloriaweb

That's perfectly true. Was overthinking it. :)