Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating A Comment Subscription Query?

Status
Not open for further replies.

sp0om

Programmer
Jan 20, 2006
2
US
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:

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);
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.
 
You nearly explained this and then didn't, its as clear as mud.

(all of the above makes sense, the only thing missing is teh problem).

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top