bundyxc Posted August 31, 2009 Share Posted August 31, 2009 I'm making a social networking site and need to figure out a way to handle relationships between users. From blocking users, to having them be 'friends', to having them group eachother ino different categories. How would I go about this in a MySQL database? Should I just make a table with all of the different relationships, and insert a new relationship each time users become friends/block/etc? Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/172588-solved-how-to-setup-database/ Share on other sites More sharing options...
fenway Posted September 7, 2009 Share Posted September 7, 2009 You sort of have no choice at at low level -- you need to map user X to user Y. Quote Link to comment https://forums.phpfreaks.com/topic/172588-solved-how-to-setup-database/#findComment-914139 Share on other sites More sharing options...
bundyxc Posted September 7, 2009 Author Share Posted September 7, 2009 Thank you for the reply fenway. So, by saying 'at low level', are you implying that there's a better (yet more 'high-level') way to do it? Quote Link to comment https://forums.phpfreaks.com/topic/172588-solved-how-to-setup-database/#findComment-914297 Share on other sites More sharing options...
fenway Posted September 8, 2009 Share Posted September 8, 2009 I'm just suggesting that at the row level you need to have some record say "user X is friends with user Y". Quote Link to comment https://forums.phpfreaks.com/topic/172588-solved-how-to-setup-database/#findComment-915033 Share on other sites More sharing options...
bundyxc Posted September 10, 2009 Author Share Posted September 10, 2009 Alright, thank you. Quote Link to comment https://forums.phpfreaks.com/topic/172588-solved-how-to-setup-database/#findComment-915819 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.