Welcome to Geeklog, Anonymous Tuesday, January 14 2025 @ 06:07 pm EST
Geeklog Forums
SQL Listing Users who are Members of Group
Status: offline
jlhughes
Forum User
Full Member
Registered: 04/25/02
Posts: 154
OK, I'm suffering a brain freeze.
I want to list all of the users who are members of a particular group.
Lets say the group name is teamone and ID for teamone is 12.
What would my SQL look like to return a result of UserNames and User IDs (uids) that are members of teamone?
Thanks in advance,
John Hughes
7
7
Quote
Status: offline
Blaine
Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
John, you can try this:
SELECT uid, username, grp_id, grp_name, grp_descr FROM gl_groups, gl_group_assignments, gl_users WHERE ug_main_grp_id = grp_id AND gl_users.uid = gl_group_assignments.ug_uid AND grp_id = 12
Geeklog components by PortalParts -- www.portalparts.com
Geeklog components by PortalParts -- www.portalparts.com
5
5
Quote
All times are EST. The time is now 06:07 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content