开发者

Recording yes or no in mysql [duplicate]

开发者 https://www.devze.com 2023-03-05 13:53 出处:网络
This question already has answers here: 开发者_如何学C Closed 11 years ago. Possible Duplicate: Which MySQL Datatype to use for storing boolean values?
This question already has answers here: 开发者_如何学C Closed 11 years ago.

Possible Duplicate:

Which MySQL Datatype to use for storing boolean values?

I need to record a yes or no, 1 or 0, it doesn't really matter. One for each day for a user. It is updated every day.

What structure should this table be?


Have a table that called whatever you need it to be, for example users_daily with the columns

id

user_id

yes (0 = no, 1 = yes) (tinyint),

timestamp


create a column of type BIT for the table

0

精彩评论

暂无评论...
验证码 换一张
取 消