Matias Posted December 25, 2005 Share Posted December 25, 2005 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 1010110 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 Quote Link to comment Share on other sites More sharing options...
fenway Posted December 25, 2005 Share Posted December 25, 2005 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.