Christian,
a DEFAULT value in a CREATE (or ALTER) statement must be a static value, try
using a TIMESTAMP field instead.
To use 'ERROR' in as an 'ENUM' DEFAULT it must be included in the definition,
i.e. ENUM('ERROR','TRUE')
Hope this helps...
John
On Thursday 08 February 2001 09:09, Christian Ribeaud wrote:
> Hi,
>
> I tried the following code:
>
> CREATE TABLE news (... published date DEFAULT 'NOW()' NOT NULL, ..., showIt
> ENUM('TRUE') DEFAULT ERROR, ...);
>
> and I was surprised to get an '0000-00-00' as date after doing a SELECT. I
> would like that the table put automatically the today's date for every
> INPUT as default value. What is wrong? Another question, 'showIt
> ENUM('TRUE') DEFAULT ERROR' did not work but 'showIt ENUM('TRUE','FALSE')
> DEFAULT FALSE' worked fine. I would like to have something like bits or
> boolean values in my table. How to achieve this? Thanks for the help and
> have a nice day. Greetings,
>
> christian
>
>
> ---------------------------------------------------------------------
> 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
---------------------------------------------------------------------
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