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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.