dxdolar Posted July 17, 2008 Share Posted July 17, 2008 Trying to figure out the structure of how to design a friend's list type feature. Right now I have ways of going about it (please enlighten me if there are others) 1: user a column, labeled 'friends' in a users table and populate it with a text string of user_id's, i.e. friends 2, 3, 4, 5, 6, to update it just add on a new number to the string, to delete it :shrug, I don't know really...haha: 2: use a friend's junction table with individual relationships, my ID and my friend's ID. i. e. id1 id2 1 | 2 1 | 3 I've been programming with PHP for about 2 weeks now, I've devoured a lot of the basic concepts and now I'm trying to move away from the examples in my book. Any help in figuring out the design would be appreciate. Plus any guidance on how to execute that design, or links to code I can use as a reference, or tuts, would also be a HUGE help. Thanks everyone! Quote Link to comment Share on other sites More sharing options...
trq Posted July 17, 2008 Share Posted July 17, 2008 The second method you describe is how I would do it simply becasue having a string of comma seperated values stored in one field makes it that much more difficult to search via mysql. Quote Link to comment Share on other sites More sharing options...
dxdolar Posted July 17, 2008 Author Share Posted July 17, 2008 to account for growth potential (thousands of members) is that still the best way? that was the way that I would have preferred to do it anyway. Quote Link to comment Share on other sites More sharing options...
trq Posted July 17, 2008 Share Posted July 17, 2008 Yep, still the best way. Quote Link to comment Share on other sites More sharing options...
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.