Re: update / subquery

2005-05-28 Thread Lieven De Keyzer
I've got mysql-4.1.10 installed. From: Chris <[EMAIL PROTECTED]> To: mysql@lists.mysql.com Subject: Re: udpate / subquery Date: Sat, 28 May 2005 22:31:19 -0700 Syntax looks fine to me. Sub-queries are only supported in 4.1.x+ , I'm guessing that's your problem. Ch

udpate / subquery

2005-05-28 Thread Lieven De Keyzer
UPDATE account SET role_id = (SELECT role_id FROM role WHERE rolename = "admin") WHERE username = "test" This gives me an: ERROR 1064 (0): You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT role_id f

Re: error 150 / FOREIGN KEY constraint

2005-05-28 Thread Lieven De Keyzer
DELETE CASCADE, INDEX (owner), FOREIGN KEY (owner) REFERENCES account(username) ON DELETE CASCADE) TYPE = InnoDB; From: Stijn Verholen <[EMAIL PROTECTED]> To: Lieven De Keyzer <[EMAIL PROTECTED]> Subject: Re: error 150 / FOREIGN KEY constraint Date: Sat, 28 May 2005 23:03:28 +0200

error 150 / FOREIGN KEY constraint

2005-05-28 Thread Lieven De Keyzer
This is a script I'm trying to execute. My mysql version is 4.1.10. SET FOREIGN_KEY_CHECKS = 0; DROP TABLE IF EXISTS owner; DROP TABLE IF EXISTS folder; DROP TABLE IF EXISTS account; DROP TABLE IF EXISTS role; CREATE TABLE role ( role_id INTEGER NOT NULL, rolename VARCHAR(25) NOT NULL, PRIMAR

Re: Different TIMESTAMP columns

2005-05-18 Thread Lieven De Keyzer
bject: Re: Different TIMESTAMP columns Date: Thu, 19 May 2005 09:52:02 +1200 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

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 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 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,

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:

Re: Multi-user bookmark system

2005-05-06 Thread Lieven De Keyzer
From: Peter Brawley <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: Lieven De Keyzer <[EMAIL PROTECTED]> Subject: Re: Multi-user bookmark system Date: Fri, 06 May 2005 11:07:48 -0500 Lieven, Here it is. Removing the FK looks to me like an incorrect fix to the transitive dependen

Re: Multi-user bookmark system

2005-05-06 Thread Lieven De Keyzer
Peter, From: Peter Brawley <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: Lieven De Keyzer <[EMAIL PROTECTED]> CC: mysql@lists.mysql.com Subject: Re: Multi-user bookmark system Date: Fri, 06 May 2005 10:09:12 -0500 Lieven, If a folder belongs to an account, why not use the accoun

Multi-user bookmark system

2005-05-06 Thread Lieven De Keyzer
I'm writing a web-application that allows users to store their bookmarks. Each user has a tree of folders (and bookmarks belong to these folders). The only thing I want to do with tree elements at the same level is display them, and let the user only go up and down in the tree by one level. No aggr