I am trying to run this query...

select distinct E.Title, E.ID, C.DateAdded from
Entries E, Comments C
where C.EntryID = E.ID
order by C.DateAdded desc
limit 10

...to get the last 10 entries that had comments added to them, but the DISTINCT is not returning distinct results. What I get is 10 entries that had the last 10 comments, but there are duplicates. For example, if entry "A" just had 3 comments added, it gets return as the first 3 results, not just once. I assume the DISTINCT is failing because of the ORDER. How should this be accomplished? I am running 3.23

Thanks, Ron


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to