Okay, so I am wanting to create a script, and the best way I can think is to call it a buddy list.
I have no problems with any aspect, except for saying who is who's buddy. What would be the best way to accomplish this? One person cannot be a friend of another, without the other being a friend of that person...
I can't quite think of how I would link them together. I first thought of like another table called friends which had USER_ID and FRIEND_ID... then just get all FRIEND_IDs for the current USER_ID... however, if user's 1 and 2 were friends.. in that table I would have
USER_ID = 1
FRIEND_ID = 2
USER_ID = 2
FRIEND_ID = 1
that seems rather redundant and surely there must be a better way. I think basically all IM programs accomplish this because I think each person has to be on each other's lists... so how can I cross reference the two user ids that they are FRIENDS OF EACH OTHER??
I hope I explained that well enough... what im thinking is hard to write down hehe..
Thanks in advance!