UseBB Community

The official board for UseBB help and discussion

UseBB Community » Help & Support » News System

News System

Moderators: Gaia.

Page: 1

Author Post
Member
Registered: Jun 2006
Posts: 25
Location: Australia
Im trying to make a news system which calls the first post out of each topic in one forum. Only admins can start topics in this. Then this will be displayed on the home page. You know how it works!

Question:
- How would I pull these exact posts out of the database, including author, date, total comments, page numbers. And have them display in order?

Help would be most appreciated.
Member
Registered: May 2005
Posts: 329
Location: Washougal, WA
Something like this http://www.usebb.net/community/topic-1087.html
Member
Registered: Jun 2006
Posts: 25
Location: Australia
Yer but from a particular forum and first post from each topic.
Developer
Registered: Apr 2004
Posts: 2191
Location: Belgium
Quote
SELECT t.id, t.topic_title, t.count_replies, t.count_views, t.status_locked, p.content, p.post_time, p.poster_id, u.displayed_name FROM usebb_topics t, usebb_posts p, usebb_members u WHERE t.forum_id = <forumid> AND t.status_sticky = 0 AND p.id = t.first_post_id AND u.id = p.poster_id ORDER BY p.post_time DESC LIMIT <numposts>


That's what I use on the front page. Basicly this is just standard SQL...

Page: 1

UseBB Community » Help & Support » News System

UseBB Community is powered by UseBB 1 Forum Software