John Siracusa wrote: > Hm, what version of MySQL are you using? I just tried this query and it > worked for me. Here's the schema and query: > > --- > > CREATE TABLE projects > ( > id INT AUTO_INCREMENT PRIMARY KEY > ); > > create table objects > ( > id INT AUTO_INCREMENT PRIMARY KEY > ); > > create table users > ( > id INT AUTO_INCREMENT PRIMARY KEY > ); > > CREATE TABLE groups > ( > id INT AUTO_INCREMENT PRIMARY KEY > ); > > CREATE TABLE user_permissions > ( > id INT AUTO_INCREMENT PRIMARY KEY, > object_id INT REFERENCES objects (id), > user_id INT REFERENCES users (id), > group_id INT REFERENCES groups (id) > ); > > CREATE TABLE group_permissions > ( > id INT AUTO_INCREMENT PRIMARY KEY, > object_id INT REFERENCES objects (id), > group_id INT REFERENCES groups (id) > ); > > SELECT * FROM > projects t1 > LEFT OUTER JOIN user_permissions t3 ON(t3.object_id = t2.id) > LEFT JOIN users t4 ON(t3.user_id = t4.id) > LEFT OUTER JOIN group_permissions t5 ON(t5.object_id = t2.id) > LEFT JOIN groups t6 ON(t5.group_id = t6.id), > objects t2; > > --- > > I'm using MySQL 4.0.25. > > -John > Ah, yes, that would be it. I'm using MySQL 5.0.22, tried your schema and query and it didn't work. Tried your schema and query on MySQL 4.1.20 and it work fine.
Thanks, Glenn Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object