OK, I think I see now. I think if you change lastpostid to firstpostid, and order by thread.dateline instead of lastpost that might do it. (There's a dateline in post as well, I don't know if the dateline of the first post is the same as the thread dateline or not. If not you might have to change post.dateline to thread.dateline on the SELECT line).
ETA: the answer seems to be that thread.dateline and dateline of the first post are sometimes different but I don't know why - maybe someone else does?
|