Let me first explain what it is I'm trying to accomplish. I have a site that has a bunch of topics with comments and I want users to be able to subscribe to other users' comments. Under each user's public profile, any other user can press a link: "subscribe to USERNAME's comments"
What happens when that link is pressed is that some data is put into a table:
feed_id: The unique identifier of each feed
feed_from: Who the feed is coming from
feed_to: Who the feed is going to
So that is all well and good. The problem is when I try to set up a query to grab all of the most recent comments made by people my users subscribe to and spit them out.
I have this to start:
From there, I would imagine I would use the resulting feed_from usernames to search my comments table for all of the most comments made by these users by date. Make sense? If not, I'd be more than happy to elaborate.
Any help would be appreciated.
What happens when that link is pressed is that some data is put into a table:
feed_id: The unique identifier of each feed
feed_from: Who the feed is coming from
feed_to: Who the feed is going to
So that is all well and good. The problem is when I try to set up a query to grab all of the most recent comments made by people my users subscribe to and spit them out.
I have this to start:
PHP:
$sql_get_comments_feed_from = "SELECT feed_from FROM users_feeds WHERE feed_to = '$_SESSION['username']' GROUP BY feed_from";
$res_get_comments_feed_from = mysql_query($sql_get_comments_feed_from);
Any help would be appreciated.