...

View Full Version : Type true false



hmvrulz
03-16-2009, 06: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.

abduraooft
03-16-2009, 09: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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum