SoilentRed
Caaan do!
I?m using Fabrik in conjunction with JomSocial. I?m using the dabasejoin element to that a user can select another site member. I would like for the only names that appear to be members that share the same groups as the user. The example in the data-where documentation only specifies results from a single group.
WHERE {thistable}.`username`
IN (SELECT jos_users.username FROM jos_users, jos_user_usergroup_map
WHERE jos_users.id = jos_user_usergroup_map.user_id
AND jos_user_usergroup_map.group_id = 14)
FYI, the Joomla usergroup tables (jos_user_usergroup_map) stores the same user id data as the JomSocial usergroup details (jos_community_groups_members). user_id in jos_user_usergroup_map is the same value as memberid in jos_community_groups_members
Obviously a user can exist in multiple groups (in JomSocial AND Joomla). Would someone please help me form a query so that the only members presented are members that share the same groups as the user?
WHERE {thistable}.`username`
IN (SELECT jos_users.username FROM jos_users, jos_user_usergroup_map
WHERE jos_users.id = jos_user_usergroup_map.user_id
AND jos_user_usergroup_map.group_id = 14)
FYI, the Joomla usergroup tables (jos_user_usergroup_map) stores the same user id data as the JomSocial usergroup details (jos_community_groups_members). user_id in jos_user_usergroup_map is the same value as memberid in jos_community_groups_members
Obviously a user can exist in multiple groups (in JomSocial AND Joomla). Would someone please help me form a query so that the only members presented are members that share the same groups as the user?