2

Hey guys I'm trying to take a member, and select the group(s) the belong to, the (other) members in that group, and all posts and comments that are in that group. I have it set right now where I am using two queries to accomplish this, but the first query is not keying off a user id so it is not correct, I would LIKE to be able to merge these two queries into one, but if not possible, just fix the first query so WHERE MemberId = '{/TheId}' is fine.

EDIT

I almost got it, I'm still relying on another query to get all FeedComments, but I have this here that does almost everything (by User Id). All it needs is to get the Users inside those groups

            SELECT 
                MemberId,
                CollaborationGroupId,

                CollaborationGroup.CreatedById, 
                CreatedBy.Name,
                Createdby.Email,

                CollaborationGroup.OwnerId, 
                CollaborationGroup.Owner.Name,
                CollaborationGroup.Owner.Email,

                CollaborationGroup.Id, 
                CollaborationGroup.LastModifiedById, 
                CollaborationGroup.Name, 
                CollaborationGroup.MemberCount, 
                CollaborationGroup.CollaborationType, 
                CollaborationGroup.Description, 
                CollaborationGroup.FullPhotoUrl,   
                CollaborationGroup.InformationTitle, 
                CollaborationGroup.InformationBody, 
                CollaborationGroup.CanHaveGuests, 
                CollaborationGroup.CreatedDate, 
                CollaborationGroup.LastModifiedDate,
                CollaborationGroup.LastFeedModifiedDate

            FROM CollaborationGroupMember c

            WHERE ( 
                    ( MemberId = {$client->identity->id} ) AND ( ( CollaborationGroup.LastModifiedDate > {$time} ) 
                                                            OR ( CollaborationGroup.LastFeedModifiedDate > {$time} ) )
                  ) 

            ORDER BY CreatedDate DESC

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.