<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><DIV></DIV>
<DIV>Brian Vuyk wrote:</DIV>
<DIV>&gt; 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;</DIV>
<DIV>&nbsp;</DIV>
<DIV>You might find something like this easier to maintain (think about an array, which could also map the levels):</DIV>
<DIV>SELECT DISTINCT u.uid, ur.rid FROM {users} u RIGHT JOIN {users_roles} ur ON ur.uid = u.uid WHERE rid&nbsp;IN (6, 8, 5, 7, 4) GROUP BY uid;<BR>&nbsp;</DIV>
<P><FONT color=#ff007f size=4 face="bookman old style, new york, times, serif"><EM><STRONG>Nancy E. Wichmann, PMP</STRONG></EM></FONT></P>
<P><FONT face="arial, helvetica, sans-serif">Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.</FONT></P>
<DIV>&nbsp;</DIV><!-- cg1.c204.mail.gq1.yahoo.com compressed/chunked Mon Nov 23 06:51:20 PST 2009 --></div></body></html>