1 up | 2 up | 3 up | 4 up | 5 up | 6 up | 7 up | 8 up | 9 up | 10 up | 11 up |
^^^ Additional posts ^^^
zorg.ch
#39810 by @ 27.07.2004 15:39 - nach oben -
Jo klar, so müsste mans dann glaub machen: (statt lastpostdate natürlich mit lastpostid)

SELECT comments.board, comments.thread_id, max( comments.lastpost ) AS lastpostdate, lastpost.id AS lastpostid, lastpost.text

FROM `comments`
LEFT JOIN comments AS lastpost ON ( lastpost.date = comments.lastpost )
GROUP BY comments.thread_id
ORDER BY lastpostdate DESC
LIMIT 0 , 30