posted 18 years ago
Hi, I have a version 2.1.4 installed and I have a problem. When I get the list of the last topics for a forum by clicking on it (this is, entering in that forum), the entries aren't shown in the correct order. I mean, If I post a reply to a specific topic with a lot of replies and visits, isn't shown at the first place of the forum topics listing. I attach a screenshot of this.
I searched in the queries file and I think this is the query
SELECT t.*, u.username AS posted_by_username, u.user_id AS posted_by_id, u2.username AS last_post_by_username, u2.user_id AS last_post_by_id, p2.post_time, p.attach
FROM foro.jforum_topics t, foro.jforum_users u, foro.jforum_posts p, foro.jforum_posts p2, foro.jforum_users u2
WHERE t.forum_id = 201
AND t.user_id = u.user_id
AND p.post_id = t.topic_first_post_id
AND p2.post_id = t.topic_last_post_id
AND u2.user_id = p2.user_id
ORDER BY t.topic_type DESC, p2.post_time DESC, t.topic_last_post_id DESC
I have executed this query in Toad and the result is Ok but in the Forum it doesn't show well.
Any idea about why this happens? Thank you.
[originally posted on jforum.net by devron]