Re: Different TIMESTAMP columns

2005-05-19 Thread mfatene
REFERENCES folder(folder_id) ON DELETE > CASCADE) TYPE = InnoDB; > > ERROR 1067 (42000): Invalid default value for 'last_scanned' > > >From: Simon Garner <[EMAIL PROTECTED]> > >To: mysql@lists.mysql.com > >Subject: Re: Different TIMESTAMP columns >

Re: Different TIMESTAMP columns

2005-05-18 Thread Simon Garner
Lieven De Keyzer wrote: mysql> CREATE TABLE bookmark ( -> bookmark_id INTEGER NOT NULL AUTO_INCREMENT, -> bookmarkname VARCHAR (80) NOT NULL, -> url VARCHAR (150) NOT NULL, -> folder_id INTEGER NOT NULL, -> last_scanned DATETIME DEFAULT NOW(), -> last_notified DATETIME

Re: Different TIMESTAMP columns

2005-05-18 Thread Lieven De Keyzer
DATETIME DEFAULT NOW(), -> PRIMARY KEY (bookmark_id), -> FOREIGN KEY (folder_id) REFERENCES folder(folder_id) ON DELETE CASCADE) TYPE = InnoDB; ERROR 1067 (42000): Invalid default value for 'last_scanned' From: Simon Garner <[EMAIL PROTECTED]> To: mysql@lists.mysql.com Su

Re: Different TIMESTAMP columns

2005-05-18 Thread Simon Garner
Lieven De Keyzer wrote: But how do I initialize the 2 datetime fields? With no DEFAULT, their values are -00-00 00:00:00. Just what I wanted to avoid with TIMESTAMP Set their value to NOW() if you want the current date/time. -Simon -- MySQL General Mailing List For list archives: http://lists

Re: Different TIMESTAMP columns

2005-05-18 Thread Lieven De Keyzer
From: Mark Matthews <[EMAIL PROTECTED]> To: Lieven De Keyzer <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED], mysql@lists.mysql.com Subject: Re: Different TIMESTAMP columns Date: Wed, 18 May 2005 14:58:41 -0500 -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: > &q

Re: Different TIMESTAMP columns

2005-05-18 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: > "Lieven De Keyzer" <[EMAIL PROTECTED]> wrote on 05/18/2005 > 03:21:02 PM: [snip] >>Yes, I have already considered using the DATETIME, but there is no Java >>class for this database type? >> >> >>>Shawn Green >>>Database Ad

Re: Different TIMESTAMP columns

2005-05-18 Thread SGreen
"Lieven De Keyzer" <[EMAIL PROTECTED]> wrote on 05/18/2005 03:21:02 PM: > > > >From: [EMAIL PROTECTED] > >To: "Lieven De Keyzer" <[EMAIL PROTECTED]> > >CC: mysql@lists.mysql.com > >Subject: Re: Different TIMESTAMP columns >

Re: Different TIMESTAMP columns

2005-05-18 Thread Lieven De Keyzer
From: [EMAIL PROTECTED] To: "Lieven De Keyzer" <[EMAIL PROTECTED]> CC: mysql@lists.mysql.com Subject: Re: Different TIMESTAMP columns Date: Wed, 18 May 2005 15:05:17 -0400 "Lieven De Keyzer" <[EMAIL PROTECTED]> wrote on 05/18/2005 01:44:31 PM: > I 'm writ

Re: Different TIMESTAMP columns

2005-05-18 Thread SGreen
"Lieven De Keyzer" <[EMAIL PROTECTED]> wrote on 05/18/2005 01:44:31 PM: > I 'm writing a webapplication in Java that allows users to store bookmarks. > The system scans these pages for differences at user-selected intervals. At > another user-selected interval, the system sends notification m

Re: Different TIMESTAMP columns

2005-05-18 Thread Lieven De Keyzer
Yes, that's what I'm talking about. Only one column can have this current_timestamp as default statement. From: [EMAIL PROTECTED] To: Lieven De Keyzer <[EMAIL PROTECTED]> CC: mysql@lists.mysql.com Subject: Re: Different TIMESTAMP columns Date: Wed, 18 May 2005 19:57:43 +0200 Hi,

Re: Different TIMESTAMP columns

2005-05-18 Thread mfatene
Hi, look at default initialised to current_timestamp. you ca see also on update : http://dev.mysql.com/doc/mysql/en/timestamp-4-1.html Mathias Selon Lieven De Keyzer <[EMAIL PROTECTED]>: > I 'm writing a webapplication in Java that allows users to store bookmarks. > The system scans these pages

Different TIMESTAMP columns

2005-05-18 Thread Lieven De Keyzer
I 'm writing a webapplication in Java that allows users to store bookmarks. The system scans these pages for differences at user-selected intervals. At another user-selected interval, the system sends notification mails about changed bookmarks. The bookmark table provisionally looks like this: