Hi,
> I am trying to insert this into my table but mysql doesn't like my syntax.
>
> alter table categoryminor solvalveyn enum('True','False');
You missed something from the query. It should be:
ALTER TABLE categoryminor ADD COLUMN solvalveyn ENUM('True', 'False');
^^^^^^^^^^
It helps if you tell MySQL that you want to add a column. :)
> When I press enter it does nothing it just goes to a greater than prompt.
You probably just forgot to terminate the line with a semi-colon (';') -
either that, or you mis-quoted the ENUM values and MySQL still thinks you're
in the string.
> What I want is for 1 to be true and 0 to be false.
In that case, you want:
ALTER TABLE categoryminor ADD COLUMN solvalveyn ENUM(1, 0);
However, if what you're thinking of is to have the field hold one or zero
and for it to be displayed as true/false, then you won't be able to do that.
MySQL will only return the actual value stored in the field - it doesn't
interpret anything for you. However, you could resort to some trickery with
IF() statements in the SELECT query to get this, but that could turn ugly.
Regards,
------------------------------------------------
Basil Hussain ([EMAIL PROTECTED])
---------------------------------------------------------------------
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