Jump to content

data flow for social networking site


anujgarg

Recommended Posts

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

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

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

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.