开发者

datatype for checkboxes in php

开发者 https://www.devze.com 2022-12-19 03:15 出处:网络
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 tinyin

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

精彩评论

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