Вопрос

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