Re: [RDBO] problem with MySQL date and datetime columns

2005-10-03 Thread Uwe Voelker
Hello Terrence, I think that -00-00 in your data model is trying to mean what NULL can mean. Yes. Can you tell us the semantics of -00-00 and NULL as well as a non-zero date in your data model? The thing is: If a column is defined NOT NULL, MySQL has "default" default value. For

Re: [RDBO] problem with MySQL date and datetime columns

2005-10-03 Thread Uwe Voelker
Hello John, Okay, I made the change and checked it into CVS. Let me know if it solves your problem. It works. Thanks, Uwe --- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and

Re: [RDBO] problem with MySQL date and datetime columns

2005-10-02 Thread Terrence Brannon
I think that -00-00 in your data model is trying to mean what NULL can mean. Can you tell us the semantics of -00-00 and NULL as well as a non-zero date in your data model? On 9/30/05, John Siracusa <[EMAIL PROTECTED]> wrote: > On 9/30/05, Uwe Voelker <[EMAIL PROTECTED]> wrote: > > Given

Re: [RDBO] problem with MySQL date and datetime columns

2005-10-02 Thread John Siracusa
On 10/1/05 3:19 AM, Uwe Voelker wrote: >> Yeah, that's one option. Have you tried defining the column like this? >> >> DATUM2 => { type => 'date', not_null => 1, default => '-00-00' } >> >> If that doesn't work, I'll probably try to make it work. > > Unfortunately this doesn't work. RDBO

Re: [RDBO] problem with MySQL date and datetime columns

2005-10-02 Thread Uwe Voelker
Hello John, Yeah, that's one option. Have you tried defining the column like this? DATUM2 => { type => 'date', not_null => 1, default => '-00-00' } If that doesn't work, I'll probably try to make it work. update() - Invalid default date: '-00-00' I would appreciate it if this wor

Re: [RDBO] problem with MySQL date and datetime columns

2005-10-02 Thread John Siracusa
On 10/1/05 11:03 AM, John Siracusa wrote: > On 10/1/05 3:19 AM, Uwe Voelker wrote: >>> Yeah, that's one option. Have you tried defining the column like this? >>> >>> DATUM2 => { type => 'date', not_null => 1, default => '-00-00' } >>> >>> If that doesn't work, I'll probably try to make it

Re: [RDBO] problem with MySQL date and datetime columns

2005-09-30 Thread John Siracusa
On 9/30/05, Uwe Voelker <[EMAIL PROTECTED]> wrote: > Given this schema: > > CREATE TABLE `DATUM` ( >`ID` int(10) unsigned NOT NULL auto_increment, >`DATUM` datetime NOT NULL default '-00-00 00:00:00', >`DATUM2` date NOT NULL default '-00-00', >PRIMARY KEY (`ID`) > ) > > I c

[RDBO] problem with MySQL date and datetime columns

2005-09-30 Thread Uwe Voelker
Hello John, it's "the ugly" MySQL again ;-) Given this schema: CREATE TABLE `DATUM` ( `ID` int(10) unsigned NOT NULL auto_increment, `DATUM` datetime NOT NULL default '-00-00 00:00:00', `DATUM2` date NOT NULL default '-00-00', PRIMARY KEY (`ID`) ) I can not save a record witho