Well i originally posted a big thank you here but the SQL query i came up with just seemed to work because the last 5 posts in my forum were all from different topics. Here's what i'm dealing with now:
Code:
SELECT
p.post_id, p.post_topic, max( p.post_time ) AS PTIME,
u.user_name, u.user_id,
t.topic_title, t.topic_id, t.topic_replies, t.topic_views,
f.forum_name, f.forum_id
FROM
wb_posts p
LEFT JOIN
wb_topics t ON p.post_topic = t.topic_id
LEFT JOIN
wb_forums f ON t.topic_forum = f.forum_id
LEFT JOIN
wb_users u ON p.post_author = u.user_id
GROUP BY
p.post_topic
ORDER BY
PTIME DESC
LIMIT
0 , 5
I find that part of this query works in getting the last 5 topics correctly but if , say, the original poster was also the last poster, it would select the original post of the topic.
Its getting quite frustrating and i think i may have to use two queries and a bit of php to kludge them together which i'm not too keen on.
Oh, and that "top 5" statement doesnt work with this mysql server either