0

Hey guys,

So, as the title says, trying to join four tables.

The purpose of the script is to:

  1. Get the username of members being "followed" from table called following

  2. Find the status updates of members in step one from table called status

  3. Retrieve all comments on status from step two from table named status_comments

  4. Get the members avatar location from table named users

I am posting from my phone at the moment, so cannot include the existing code....
I have no problems joining three of the four tables, just adding the fourth is killing me...

Some schema is below:

Members being "followed": following.member
Being "followed" by: following.followed_by
Status ID: status.id
Comments: status_comments.sid
Status "owner": status.member
Members who posted a comment: status_comments.comment_by
Commenters avatar: users.pic

Even just showing me the way to structure this query with psuedo code would be a great help!

Thank you in advance!

2
Contributors
1
Reply
17
Views
3 Years
Discussion Span
Last Post by diafol
1

Perhaps if you could post your table schemas and indicate with an asterisk which fields you need included and include any relevant filters (e.g. WHERE or HAVING clauses).

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.