pengu Posted September 28, 2010 Share Posted September 28, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/214580-phpbb-forums-mysql/ Share on other sites More sharing options...
pengu Posted September 28, 2010 Author Share Posted September 28, 2010 Nevermind. GROUP BY ftw, figured it out. Quote Link to comment https://forums.phpfreaks.com/topic/214580-phpbb-forums-mysql/#findComment-1116585 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.