View Full Version : Type true false
03-16-2009, 07:41 AM
Which Type should i use when i want a value of a field as true and false.
Should i use enum or tinyint ? or anyother which is mych more suitable.
I will be using CakePHP for development.
03-16-2009, 10:12 AM
tynyint/bool, See http://dev.mysql.com/doc/refman/5.0/en/numeric-type-overview.html
These types are synonyms for TINYINT(1). A value of zero is considered false. Non-zero values are considered true: If you really need to save it as true/false string, then you might need a char/varchar, but the other one is far better.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.