Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Current Version (Old)
 Latest 10 posts in forum?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Krauw
Starting Member

Denmark
24 Posts

Posted - 18 July 2001 :  02:54:15  Show Profile  Visit Krauw's Homepage  Send Krauw an ICQ Message
How do I get the latest 10 posts out to the forum for a table on my web sites frontpage? I have tried with this SQL statement:

select FORUM_TOPICS.t_replies, FORUM_TOPICS.topic_id, FORUM_TOPICS.forum_id, FORUM_TOPICS.cat_id, FORUM_TOPICS.t_subject, FORUM_REPLY.r_message from FORUM_TOPICS left join FORUM_REPLY on FORUM_TOPICS.topic_id = FORUM_REPLY.topic_id where FORUM_TOPICS.FORUM_ID<>10 order by FORUM_TOPICS.t_date desc, FORUM_REPLY.r_date desc


But this does not give me the right records, and it does not sort the records either.

There must be many that have done this, so perhaps I could get a SQL statement that works from any of you?

Thanks

Regards
Krauw

Deleted
deleted

4116 Posts

Posted - 18 July 2001 :  05:06:42  Show Profile
Please have a look at Display Content Mod (current version number is 2) and Slash Mod (current version number is 3sr1). They already do what you want. You may like to use them directly or modify or just examine the code.

BTW
You have to join the topics with replies, sort them in post date/time and select the TOP 10.


Think Pink
Go to Top of Page

Krauw
Starting Member

Denmark
24 Posts

Posted - 18 July 2001 :  06:08:35  Show Profile  Visit Krauw's Homepage  Send Krauw an ICQ Message
I've had a look at the two MODS you mention but it seems like quite some work, and I do have everything in place except from the SQL statement. So I would appreciate if anyone could help me with that.

As you can se I already join the two tables and sort them like you say, but anyway....

/Krauw
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07