Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Error in Topic order

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is already fixed!

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, I'll upgrade to the last version.
[originally posted on jforum.net by devron]
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!