Hello

I have a slight problem with my forum. I was thinking of ordering threads by last post and was wondering how to do that. I had tried to do a query where I group by the parentid and order by datetime and then compare the id to the threads and print them out. But my idea failed since I do 'group by parent order by date' it groups first and not neccisarily the latest post and then orders by date.
Is there any way I could somehow group by parentID and let it select the latest post when grouping?

Else is there any nice way of doing this? I had thought about selecting the whole table, inserting it into a two dimensional array and order that by date and then I get the correct order but that would be very speed draining when I have many posts.

If you have any better idea or if you have done this please post with advice!!!

Thanks in advance!