Hi,

This sounds quite complex but i think this is the only way i will get the effect i want. Basically I have a table of articles. This needs to join to a table that specifies which groups can read the articles. This then joins onto a table specifing the groups that the user belongs too. Finally there is a condition that is the userid of the currently logged in user. Phew !

I have created the following query which appears to work however it is quite slow to execute, is there any less clunky way to do this query or table layout? If you need to see the table schemas i can post them.

Code:
select distinct article.title from users JOIN groupmembers using(userId)
JOIN autharticle using (groupId) JOIN article using(articleId) WHERE users.userI
d=$userId;
Thanks in advance,

Tom