Feed Rss



Feb 27 2008

PhpBB Latest Threads

category: Snippets,SQL author:

You can use the following code to get the latest threads from a PHPbb forum, it extracts the post information and the user information. Remember to replace "tblprefix" with your defined table prefix.

SELECT
p.post_id,
p.topic_id,
p.forum_id,
p.post_time,
p.poster_id,
pt.post_subject,
pt.post_text,
u.username
FROM
`tblprefix_posts` p
INNER JOIN
`tblprefix_posts_text` pt
ON
pt.post_id = p.post_id
LEFT JOIN
`tblprefix_users` u
ON
p.poster_id = u.user_id
ORDER BY
p.post_id DESC

tag: ,

Leave a Reply