문제

I am trying to create a social networking app for my project. This requires that when a user A tries to access the profile of a non-friend user B, it has to display only limited information. And when the user A becomes the friend of B, or user B changes his privacy settings, then all his profile information should be visible.

This looks the same as facebook, but i am trying to understand how is this implemented in SQL/database.

Your replies will be most helpful..

도움이 되었습니까?

해결책

Its simple.Just use a field called isfriend among two persons and by default for any person, it would be false and if it is false he can't see the info. of other persons unless and until other becomes friend and in that case value of isfriend for the two persons would be true and they can see each others details.Did i missed something?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top