Re: [win32,mysql v. 3.23.32]Now() function and ERROR in enum

2001-02-08 Thread John Cichy
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,

RE: [win32,mysql v. 3.23.32]Now() function and ERROR in enum

2001-02-08 Thread Carsten H. Pedersen
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 '-00-00' as date after doing a SELECT. I would like that the table put automatically the today's date for every

Antwort: [win32,mysql v. 3.23.32]Now() function and ERROR in enum

2001-02-08 Thread alexander . skwar
On 08.02.2001 15:09:47 Christian Ribeaud wrote: would like that the table put automatically the today's date for every INPUT as default value. What is wrong? Uhm, why don't you use a timestamp column type then? Okay, it will also save the time, but it's easy to extract only the date, if