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
>
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
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
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
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
-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
"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
>
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
"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
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,
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
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:
12 matches
Mail list logo