Welcome Guest, Not a member yet? Register   Sign In
How do to get User Activity of friends?
#1

[eluser]flyenig[/eluser]
If you go on myspace, or facebook, or twitter, they have an activity stream of all your friends - Their Status', pictures that has been recently uploaded, etc.

How would their sql statement look like to retrive the statuses of every friend?
#2

[eluser]bretticus[/eluser]
This really isn't that hard. You need a table to store actions that EVERYONE performs. You need a table that maps a friend to a user. You need a user table to store user details (in particular an auto-incremented user id for the aforementioned map table.) Finally just query the action records by joining the three tables and restrict to friends by using a where clause on the map table to friends of the current user only.




Theme © iAndrew 2016 - Forum software by © MyBB