I have several Yes/No fields ( they are truely Yes/No with No being the defaul value ).
What is the correct way to code the value in the table. Yes/No or 1/0?
I have several Yes/No fields ( they are truely Yes/No with No being the defaul value ).
What is the correct way to code the value in the table. Yes/No or 1/0?
esm
"The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."
.
There's no boolean (0 and 1) type in mysql. You can use char(1) type to handle it. It will allow you to write single character in that field.
Do you to insert into table?What is the correct way to code the value in the table. Yes/No or 1/0?
say you have table structure like this:
table name config
name varchar(50)
value char(1)
Then your query to insert:
INSERT INTO data (name, value) VALUES ('visible',0)