I need to pull data from two tables, and it’s a bit over my head :
The first tables contains a list of members (member_id, username, email …)
The second table stores relations between members (id, member_id, friend_id)
When a member adds another member as a friend, both member_ids are stored in the second table.
Now I need to output that second table, I’d like to output usernames instead of numbers :
example :
{username corresponding to member_id} added {username corresponding to friend_id} as a friend
Can someone help with the query ?
Something like: