merk
10-03-2002, 12:45 PM
SELECT MAX(thread.title) as ttitle,MAX(thread.dateline) as dateline,MAX(thread.threadid) as threadid,MAX(thread.replycount) as comments,MAX(thread.lastpost) as lastpost,forum.forumid,forum.title,forum.descripti on,forum.parentid FROM thread
INNER JOIN forum USING (forumid)
GROUP BY forum.forumid
HAVING forum.parentid=8
ORDER BY dateline DESC
This returns the correct result the first time (the forum that was updated the latest), with the correct name of the latest thread.
But all subsequent forums that it returns(still in the correct order of latest "thread"), it returns the first thread of that forum, not the latest.
I can do it with a sub-select, but mysql doesnt support that. Any thoughts?
INNER JOIN forum USING (forumid)
GROUP BY forum.forumid
HAVING forum.parentid=8
ORDER BY dateline DESC
This returns the correct result the first time (the forum that was updated the latest), with the correct name of the latest thread.
But all subsequent forums that it returns(still in the correct order of latest "thread"), it returns the first thread of that forum, not the latest.
I can do it with a sub-select, but mysql doesnt support that. Any thoughts?