casbboy
6-29-06, 07:04 PM
I can't get this to work properly:
$gannouncement = mysql_query("SELECT DISTINCT comments.person_id, comments.comment_id, comments.party, people.person_id, people.name, people.type FROM comments JOIN people ON (comments.person_id = people.person_id) ORDER BY comments.comment_id DESC LIMIT 8",$connection);
There is no error but it isn't working. I want it to pull the DISTINCT rows in the comments.person_id column.
The first 8 rows that all have a different person_id in the comments table. Why isn't it working?
Thanks
Ryan
$gannouncement = mysql_query("SELECT DISTINCT comments.person_id, comments.comment_id, comments.party, people.person_id, people.name, people.type FROM comments JOIN people ON (comments.person_id = people.person_id) ORDER BY comments.comment_id DESC LIMIT 8",$connection);
There is no error but it isn't working. I want it to pull the DISTINCT rows in the comments.person_id column.
The first 8 rows that all have a different person_id in the comments table. Why isn't it working?
Thanks
Ryan