I am developing a friends system in my system and would like to know how best to organize the table that will take care of such records amigos
:
I've thought of something like this:
Tabela "amigos" (apenas 3 colunas)
-----------------------------------
id | usuario | usuarioamigo
But I do not know if this is the best way to do it, let alone how you could do the query relationship to know if a user is friends with another user.
What is the best way to do this and how to do it?