galdikas Posted April 11, 2011 Posted April 11, 2011 Ok.. I am trying to implement friends system. Where you have to send reqyest ti become friends, and it then can be accepted or declined.. I have a good idea how I will make the request/accept/deny system. But not how to make table for actuall friends list. So: if(accept_invitation) { what here? my idea: mysql_query(INSERT INTO friends (ID1,ID2)) mysql_query(INSERT INTO friends (ID2,ID1)) } then generate the friends list $friends=mysql_query(SELECT * FROM friends WHERE ID1=$_SESSION['userid']) while($f=mysql_fetch_assoc($friends)) { $name=mysql_query(SELECT userame FROM users WHERE userid=ID2) echo"$name['username']" } I hope yous can get the idea from the mock up code what im thinking of doing.. And can make some comments wether its the good way, or is there bettter ways?? Quote
galdikas Posted April 13, 2011 Author Posted April 13, 2011 Ok.. I managed to come up with system myself :) I think yous can delete this thread now.. :) Quote
a_bertrand Posted April 13, 2011 Posted April 13, 2011 Normally we don't delete a thread when something is solved ;) Quote
galdikas Posted April 13, 2011 Author Posted April 13, 2011 Well I just thought since there was no solution in it, yous mught as well :) Well if yous dont... Maybe when I will have time ill explain how I did, maybe it will help someone else :D Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.