adamlacombe Posted March 29, 2011 Share Posted March 29, 2011 I was wondering what approach you would take to code a news feed like Facebook has. I have a status, users, and photo mysql tables. Would you create a new table called "feed" and have a query run everytime someone updates, inserts, etc anything in those three tables? or something else? What would be the most efficient way to code a news feed? Thanks in advanced! Quote Link to comment https://forums.phpfreaks.com/topic/232084-like-facebook-news-feed/ Share on other sites More sharing options...
adamlacombe Posted March 29, 2011 Author Share Posted March 29, 2011 bump Quote Link to comment https://forums.phpfreaks.com/topic/232084-like-facebook-news-feed/#findComment-1193813 Share on other sites More sharing options...
adamlacombe Posted March 29, 2011 Author Share Posted March 29, 2011 Nobody has any ideas.. at all? :-\ Quote Link to comment https://forums.phpfreaks.com/topic/232084-like-facebook-news-feed/#findComment-1193865 Share on other sites More sharing options...
Skewled Posted March 29, 2011 Share Posted March 29, 2011 I was wondering what approach you would take to code a news feed like Facebook has. I have a status, users, and photo mysql tables. Would you create a new table called "feed" and have a query run everytime someone updates, inserts, etc anything in those three tables? or something else? What would be the most efficient way to code a news feed? Thanks in advanced! I think you've answered your own question in your question lol. You could use a query when a user updates a status, inserts, etc. You could code the news feed in PHP but to allow auto refreshing: You could also use some AJAX to auto refresh user pages Quote Link to comment https://forums.phpfreaks.com/topic/232084-like-facebook-news-feed/#findComment-1193870 Share on other sites More sharing options...
tomfmason Posted March 29, 2011 Share Posted March 29, 2011 Problems with this thread: 1) you bumped it twice in one day -- nearly once per hour since you posted 2) no code whatsoever -- this is a board for php coding help. Which implies you have existing code that you need help with. Please take the time to read our Rules and Terms of Service. Quote Link to comment https://forums.phpfreaks.com/topic/232084-like-facebook-news-feed/#findComment-1193874 Share on other sites More sharing options...
adamlacombe Posted March 29, 2011 Author Share Posted March 29, 2011 Well thanks you for the reply, kadeous. and no you're right, tomfmason, I don't have any code..... yet oh and I only bumped it once btw. Do you think using JOIN would work for combining the three tables? I am no good at JOINs... I looked at some tutorials but still a little confusing. So I think JOIN would do better because I dont want to select three different tables in three different querys and then fetch them in an array. If I did that things wouldn't be organized by date, it would be organized by what query got fetched first.. correct? Quote Link to comment https://forums.phpfreaks.com/topic/232084-like-facebook-news-feed/#findComment-1193900 Share on other sites More sharing options...
Maq Posted March 29, 2011 Share Posted March 29, 2011 and no you're right, tomfmason, I don't have any code..... yet oh and I only bumped it once btw. You bumped twice. Do you think using JOIN would work for combining the three tables? I am no good at JOINs... I looked at some tutorials but still a little confusing. So I think JOIN would do better because I dont want to select three different tables in three different querys and then fetch them in an array. If I did that things wouldn't be organized by date, it would be organized by what query got fetched first.. correct? Correct, you would want to use a join. Google some examples and give it a shot. Quote Link to comment https://forums.phpfreaks.com/topic/232084-like-facebook-news-feed/#findComment-1193905 Share on other sites More sharing options...
adamlacombe Posted March 29, 2011 Author Share Posted March 29, 2011 I did? huh okay... Hmmm I just went over it all in my head again... would I want to structure it like that you think? Or as I said before just anytime someone posts or updates content it gets inserted into a table called "feed" then I could select all of it from there.. I think thats a better idea, what do you think? Sorry if I am just babbling along.. just trying to organize my thoughts, the adderall is wearing off lol Quote Link to comment https://forums.phpfreaks.com/topic/232084-like-facebook-news-feed/#findComment-1193909 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.