Azu Posted October 4, 2007 Share Posted October 4, 2007 Hello! Please tell me how to make it so a certain column only takes two values (1/0 or on/off) so that it will only take 1 bit of space. Quote Link to comment https://forums.phpfreaks.com/topic/71802-solved-boolean/ Share on other sites More sharing options...
Barand Posted October 4, 2007 Share Posted October 4, 2007 Min length is byte (tinyint) but you could have up to 8 on/off values in it. Quote Link to comment https://forums.phpfreaks.com/topic/71802-solved-boolean/#findComment-361900 Share on other sites More sharing options...
wildteen88 Posted October 4, 2007 Share Posted October 4, 2007 Hello! Please tell me how to make it so a certain column only takes two values (1/0 or on/off) so that it will only take 1 bit of space. Could use ENUM Quote Link to comment https://forums.phpfreaks.com/topic/71802-solved-boolean/#findComment-361903 Share on other sites More sharing options...
Azu Posted October 5, 2007 Author Share Posted October 5, 2007 Okay thanks guys Quote Link to comment https://forums.phpfreaks.com/topic/71802-solved-boolean/#findComment-362298 Share on other sites More sharing options...
fenway Posted October 6, 2007 Share Posted October 6, 2007 Or use the new column type that they invented just for this -- BOOLEAN. Quote Link to comment https://forums.phpfreaks.com/topic/71802-solved-boolean/#findComment-363266 Share on other sites More sharing options...
Barand Posted October 6, 2007 Share Posted October 6, 2007 What size is a BOOLEAN column? Quote Link to comment https://forums.phpfreaks.com/topic/71802-solved-boolean/#findComment-363269 Share on other sites More sharing options...
fenway Posted October 6, 2007 Share Posted October 6, 2007 BOOL, BOOLEAN These types are synonyms for TINYINT(1). Quote Link to comment https://forums.phpfreaks.com/topic/71802-solved-boolean/#findComment-363273 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.