anujgarg Posted November 15, 2008 Share Posted November 15, 2008 Hi I am about to build a social networking concept in my site. Please tell me the work flow and data flow in the back end. How can one person establish networks with multiple persons? Should I take more than 1 table for this purpose? If no, then how can I maintain the relationships between USER IDs? Though, the logic is clear; but I am getting confused before starting on my own. TIA Anuj Link to comment https://forums.phpfreaks.com/topic/132812-data-flow-for-social-networking-site/ Share on other sites More sharing options...
waynew Posted November 15, 2008 Share Posted November 15, 2008 Have a user table. Each user has a user_id of course. Then, set up a comments table, for example. The comments table could look something like this: Comment comment_id sender_id receiver_id comment_body timestamp When the user posts a comment to another user, simply place his user_id (which you should probably place inside his or her session) inside the sender_id column and place the user_id of the person who is due to receive the comment inside the column, receiver_id. Hope that kind of helps? Just link everything back to the user_id. Each user could have his or her own profile page. profile.php?user_id=whatever Link to comment https://forums.phpfreaks.com/topic/132812-data-flow-for-social-networking-site/#findComment-690754 Share on other sites More sharing options...
anujgarg Posted November 17, 2008 Author Share Posted November 17, 2008 Thanks waynewex for the reply.... But I think I need to elaborate my query. All I want to do is to create a Friends Network like Orkut. In such a way, I would have to manage the entire tree structure of the (database) network. How can I follow from the root to the last node of the tree to manage the mutual friends (as it happens in Orkut)? Please suggest... TIA Anuj Link to comment https://forums.phpfreaks.com/topic/132812-data-flow-for-social-networking-site/#findComment-691862 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.