Jump to content

Recommended Posts

Hey cant seem to figure this out!

 

I have users, following, and post all different tables It's kinda like Twitter

 

I have users that can Follow other users but I need to get the users post that he/she is following

 

Following Table

user_id

follower_id

 

Users Table

id

 

Post Table

id

user_id

 

I need to inner join the three tables so that user_id can get the followers post if you goto http://www.eve-lounge.com

I just need to get the post from the users someone is following.

Link to comment
https://forums.phpfreaks.com/topic/155061-cant-get-no-help-in-the-mysql-section/
Share on other sites

Maybe you're not receiving help because:

 

- You never asked a question.

- You didn't specifically mention what part you're having trouble with.

- You didn't make any attempt.

- Now you posted in the wrong section causing a double post which is annoying and wastes people's time if they read one and the other is solved.

 

You need to join the tables and check the "user_id" on "Post Table" and grab the "id" for the post.

 

I'm not sure why you want an inner join?  Maybe I'm mistaken but I think a LEFT JOIN would work.  Read more here: JOINS.

 

Guest
This topic is now 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.