Colin Faber writes:

> I fail to see why ENUM() isn't used in this case, This is exacly what
> its for.

Well, if you have an enum('0','1'), the numerical values stored
in the database will be 1 and 2, and so you would have to put
your values in quotes when you insert, or you'll end up with
'' and '0' instead of '0' and '1'. It will also not be possible
to use boolean operator on the column, since the numerical
values of '0' and '1' will be 1 and 2. Something like
"SELECT * FROM foo WHERE bar" will return all rows that don't
have '' in bar, which is not the expected behavior if bar
is a boolean.

//C

-- 
 Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280
 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/
 Amiga user since '89, and damned proud of it too.


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to