SELECT G.groupID, G.groupName
FROM `groups` G, `groupMembers` M
WHERE (M.userID = '$sessionUserID'
OR M.userID = '$profileUserID')
AND G.groupID = M.groupID
LIMIT 0,99;
FROM `groups` G, `groupMembers` M
WHERE (M.userID = '$sessionUserID'
OR M.userID = '$profileUserID')
AND G.groupID = M.groupID
LIMIT 0,99;
本文介绍了一种SQL查询方法,用于从数据库中获取用户所属的特定组信息。通过连接groups和groupMembers表,并使用条件筛选出指定用户的组名。
5535

被折叠的 条评论
为什么被折叠?



