suppose i have two tables 1. messages 2. friends
than how can i get the activity of users from friends table and show it to current active user if 2nd or other user is in his friends list..........order by id just like facebook newsfeed
suppose i have two tables 1. messages 2. friends
than how can i get the activity of users from friends table and show it to current active user if 2nd or other user is in his friends list..........order by id just like facebook newsfeed
Maintain a session table where you store user sessions, place an index on the user_id in the session table. Query your database getting all friends of a user with a direct join on the session table.