Results 1 to 3 of 3
Thread: Facebook style friendlist
Jun 24, 2012, 20:04 #1
- Join Date
- Aug 2009
- 0 Post(s)
- 0 Thread(s)
Facebook style friendlist
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.
Could anyone point me in the right direction?
It would be greatly appreciated.