Brian Vuyk wrote:
> SELECT DISTINCT u.uid, ur.rid FROM {users} u RIGHT JOIN {users_roles} ur ON 
> ur.uid = u.uid WHERE rid = 6 OR rid = 8 OR rid = 5 OR rid = 7 OR rid = 4 
> GROUP BY uid;

You might find something like this easier to maintain (think about an array, 
which could also map the levels):
SELECT DISTINCT u.uid, ur.rid FROM {users} u RIGHT JOIN {users_roles} ur ON 
ur.uid = u.uid WHERE rid IN (6, 8, 5, 7, 4) GROUP BY uid;
 
Nancy E. Wichmann, PMP
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.

Reply via email to