I've been making a small social media app and as most social media apps it must have a friends list. I've organized my friends table very simply. It contains 3 fields: id, friend1, friend2. I'm not certain this is the best method but so I've been told.
I know very basic MySQL but trying to learn more advanced combinations of sql functions. What I want to achieve is selecting all the friend1 or friend2 that is not = to username but the username must be one of friend1 or friend2.
I'm also trying to join tables, to obtain the user data, so SELECT username, picture from the database.