The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
query help please - usergroups
Hi
From a MySQL prompt (or basically anywhere) I'm looking to return a list of members who are a member of usergroup 10 and also of usergroup 20. Any assistance with the query to do this would be great. Cheers Simon |
#2
|
||||
|
||||
select * from user where usergroupid=10 or usergroupid=20;
|
#3
|
|||
|
|||
not quite sir, but thank you for your reply.
That will return me a list of members who's primary usergroup is 10 or is 20. I need a query that will return members who *are a member of* group 10 *and* group 20. So it needs to query the membergroupids field as well as the usergroupid field. In fact.. if it makes it any easier, I'd be happy to drop the usergroupid field and just focus on the membergroupids field. Thanks in advance. Simon |
#4
|
||||
|
||||
well why didn't you say so.
select * from user where find_in_set('10',membergroupids) or find_in_set('20', membergroupids); |
#5
|
|||
|
|||
I did Quote:
All the best Simon PS. Your query still reads "OR" rather than "AND". PPS. Thank you, that worked a treat |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|