开发者

datatype for checkboxes in php

Wh开发者_JAVA技巧at should be the data type that will be entered in phpmyadmin if I plan to use a checkbox as an input?


The MySQL documentation recommends using tinyint(1) for boolean values, so tinyint(1) is probably the best.

http://dev.mysql.com/doc/refman/5.0/en/numeric-type-overview.html


If you have a set of related checkboxes that you would like to store in a single column, you might also consider SET datatype, which is similar to ENUM in that you can have names for each of your "options", but SETS lets you have multiple selected named options.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜