Jump to content


This topic is now archived and is closed to further replies.


MySQL Column Choice

Recommended Posts

ok lets say there was database that consisted of switchboard values (on or off)


column 1 (0 or 1)

column 2 (0 or 1)

column 3 (0 or 1)

column 4 (0 or 1)

column 5 (0 or 1)

column 6 (0 or 1)


now all of those are what they are (they define what is activated)


anyways right now they have their own correctponding colums, but I want to make them into one line of numbers...


so something like this




pretty much like chmod only its binary...


now which way would be best to do so. Should I make a column that is CHAR(6) or should I make a MEDIUMINT(6) colum.


Or if its possible, can a BIT column be made, so its binary



which way is better


Share this post

Link to post
Share on other sites

AFAIK, they did add a BIT column type in MySQL 5, so obviously, that would be ideal. In pre-5, I would suspect the INT columns would be better suited, but you can always check the relevant [a href=\"http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html\" target=\"_blank\"]refman page[/a] that discusses column storage requirements.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.