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. 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. 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 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 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. 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? 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). Link to comment https://forums.phpfreaks.com/topic/71802-solved-boolean/#findComment-363273 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.