Page 1 of 1

phpBB latest posts problem

Posted: Mon Jun 21, 2004 10:36 am
by Joe
I was wondering how I could make my latest forum posts which is similar to the on on these forums show the last poster of the topic rather than the overall author. I am currently selecting from phpbb_topics and then querying the name from phpbb_users like this:

SELECT * FROM phpbb_topics AS topic, phpbb_users AS user WHERE topic.topic_poster=user.user_id ORDER BY topic_id DESC LIMIT 5

But is there any method to show the last poster like I asked. Its confusing to explain this but I will try as hard as I can.


All the best!


Joe 8)

Posted: Mon Jun 21, 2004 11:39 am
by tim
DESC LIMIT 1?

Posted: Mon Jun 21, 2004 11:42 am
by Illusionist
I've never used phpBB before so i don't know any of the fields, but if there is a date field for when the latest post was posted you could try something like:

SELECT * FROM phpbb_topics ORDER BY date DESC LIMIT 1