$result = mysql_query ("SELECT DISTINCT thread_id FROM forum_posts ORDER BY id DESC LIMIT 20");
This gets 20 dustinct rows.... how can I get other data from these rows?
Almost like
$result = mysql_query ("SELECT DISTINCT thread_id, id FROM forum_posts ORDER BY id DESC LIMIT 20");
But this does not work.