Answer by Vinay for Query to fetch comments from the news feed
The below query is used to fetch all the News Feed itemsSELECT DISTINCT ft.ID AS ID, ft.userid, ft.content, ft.timestamp, ft.likes, ft.comments, u.username, u.avatar, ft.friend_id,...
View ArticleAnswer by Juan Carlos Oropeza for Query to fetch comments from the news feed
This is what I have. But because you desire result isnt clear I dont want spend much time trying to solve something may dont be what you need.SQL DEMO-- get friends of userid = 1SELECT CASE WHEN userid...
View ArticleAnswer by Parfait for Query to fetch comments from the news feed
Consider replacing the ON clause condition, AND ft.userid IN (SELECT u.ID ..., for a WHERE clause since this expression is set on a non-feed_itemJOIN, specifically the usersJOIN:SELECT DISTINCT ft.ID...
View ArticleQuery to fetch comments from the news feed
Once when a person posts the news feed and also when other users become a friend, both the person and his/her friend's news feed must be selectedbased on the checking whether he/she is a friend or not...
View Article
More Pages to Explore .....