Jump to content

Advice on Social Network Idea


derekshull

Recommended Posts

There is 2 parts to this post. The first part is this:

 

I'm making a social network with followers on it. I want to people to be able to follow each other, so I have a database and a table of users. I've thought about how it would be possible for someone to follow a lot of people (say millions if they wanted to). My first thought was to create a table and just make 1 column for the username of the person and then add a bunch of columns of the usernames that person is following...but that's inefficient. So I needs ideas and advice on the code. Is there a possible way that when a person follows someone the system checks to see if that person has followed anyone else and if not they it puts their username in the first column and then puts the followee's username in the next column. Then when they follow someone else it look up the followers username name and just adds the next followee's username into the columns after the last followee? That way I don't have to have a set number of people that users can follow.

 

Then there is the "news feed" part.

I want to create a "news feed" that displays the posts of all the people the user follows. I have a table of posts that are flagged by the authors username and I WILL have the table of people the user follows. Any ideas on how to make the feed display in order what the peoples posts are that the user follows?

Link to comment
Share on other sites

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.