How to Query in DB so sender and receiver both can see Accepted Request

Viewed 34

I have view in thymeleaf where one person is sending request to another person and other person is accepting that request. So, I want to query in SQL Server(MS SQL) So, once the request is accepted, it should be visible to both user (sender as well as for receiver).

Currently I am using the DB Query like this:

Select ud.birth_FName, ud.birth_LName, ud.memberID, ud.GUUID, ud.profileImage,ud.presetAddressCity,ir.requestReceivedOn, ir.receiverGUUID, ir.senderGUUID, ir.interestRequestID from UserDetails ud JOIN InterestRequest ir on ud.GUUID=ir.receiverGUUID WHERE  ir.requestStatus=1 and receiverGUUID='7b5044c2-f3d7-4d68-8bee-f4e668f9a54e'

once this query is made it is only visible to receiver person as Accepted but not on Sender person side. So, I need to modify this query is such a way, so, both person can see the accepted request.

Thanks in advance for helping me. If you need any clarification, please do let me know.

0 Answers
Related