valtido Posted June 19, 2007 Share Posted June 19, 2007 Hi all im in a sorta dilema more or less. Basically i have tried a few different things on how to make a relationship between users and their friends ... Basically i got tables like sooo.. Users Table UserID - UsersName - FriendsID 1 John ? 2 Ben ? 3 Tom ? Friends table Friends ID UserID Status 1 ? Accepted 2 ? Rejected 3 ? Pending so whot im trying to do is to find a way to allow this people to be friends whith one another and when they other user accepts the friendship request they are friends.... for example john sends a request to be friends with ben and ben accepts they are now friends... if you dont understand please ask thank you.... Link to comment https://forums.phpfreaks.com/topic/56152-mysql-join-tables-need-help/ Share on other sites More sharing options...
DanDaBeginner Posted June 19, 2007 Share Posted June 19, 2007 you may put two insert there - for example if id=1 add id=20 then there will be two rows for them one for id=1 saying that his friend is id=20 and vice versa... then if id=1 deleted id=20 as his friend then delete row id=1 and change the status of id=20..something like that may help you... Link to comment https://forums.phpfreaks.com/topic/56152-mysql-join-tables-need-help/#findComment-277403 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.