2
I am developing a system of friendships in my system and would like to know the best way to organize the table that will take care of such records amigos
:
I’ve thought of something:
Tabela "amigos" (apenas 3 colunas)
-----------------------------------
id | usuario | usuarioamigo
However I do not know if it is the best way to do and much less how could do the query relationship to know if a user is a friend of another user.
What’s the best way to do it and how to do it?
First you should check if a user can also be a friend, if yes, I fear that a self relationship might come to solve your problem.
– ptkato