03-12-2008, 03:22 PM
|
#10 (permalink)
|
|
Moderateur
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
|
Quote:
Originally Posted by ReSpawN
I advise you to set the field to int(1) and put a 0 for no, and a 1 for yes. That way, the system would be more secure and you wouldn't have to mess with upper or lower case characters.
|
There is a BOOLEAN / BOOL data type which you can use, where zero is false and non-zero is true. Storing true/false values within an INT column is a complete waste of space since that type uses four bytes. BOOL (or even TINYINT) only requires one byte. Specifying INT(1) does not restrict the range of allowed values to one byte in length (0-255 unsigned).
|
|
|
|