Question

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..

Was it helpful?

Solution

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?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top