Gossamer Forum
Quote Reply
Enum field
Alex,

I had problems trying to add an Enum through the built in table editor, using standard MySQL syntax:

Failed to execute query: 'ALTER TABLE Links ADD COLUMN isLive ENUM('\'No\', \'Yes\'') DEFAULT '\'No\''' Reason: Invalid default value for 'isLive'


Where the enum values were 'No', 'Yes' and the default was both - No and 'No' (neither worked).

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ


Quote Reply
Re: Enum field In reply to
Hi,

Can you tell me what you entered in the add form?

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Enum field In reply to
Hi,

That's what I tried to with the explanation line :)

I used 'No','Yes' for the values, and tried both No and 'No' for the default.


PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ


Quote Reply
Re: Enum field In reply to
Hi,

Ah, that's the problem. Don't use quotes! Just put:

No
Yes

in the textarea box.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Enum field In reply to
How would you put in 'Other Sites' ? Spaces are legal in enums.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ


Quote Reply
Re: Enum field In reply to
It's one entry per line. So you would put:

Yes
No
Other Sites

Cheers,

Alex

--
Gossamer Threads Inc.