Jump to content

PHPBB Forums + MySQL


pengu

Recommended Posts

Alright what I'm aiming to do here is integrate PHPBB forums with my own PHP project I'm writing up, after going through a few tutorials I got this all sorted out, nice and easy really.

 

The problem I'm having now is I'm trying to do a news page, I have setup my forums to have a Category and under that category I have a forum called "news", what I want to display is the topics only, not the posts and I've written up a query but it's displaying all the posts, rather than the topics only.

 

SELECT phpbb_topics.topic_id, phpbb_topics.topic_poster,phpbb_users.username, phpbb_posts.post_subject, phpbb_posts.post_text
FROM phpbb_topics
INNER JOIN phpbb_posts ON phpbb_topics.topic_id = phpbb_posts.topic_id
LEFT JOIN phpbb_users ON phpbb_topics.topic_poster = phpbb_users.user_id
WHERE phpbb_topics.forum_id = 26
AND phpbb_topics.topic_type = 0
ORDER BY phpbb_topics.topic_id DESC
LIMIT 0 , 10

 

Just need some help on how to make it bring up only topic items!

Hope you can help.

 

- Pengu

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.