View Single Post

   
  #1 (permalink)  
Old 02-28-2008, 08:52 AM
pillepop2003@yahoo.de
 
Posts: n/a
Default Forum query without subselect

Hey guys!
I'm just coding a little forum application and have some trouble with
my "thread-overview" page.
I want to list a table with the following information:

Thread_title | username_of_last_post | datetime_of_last_post

My schema is as follows:

thread (thread_id, thread_title, ...)
post (post_id, thread_id, user_id, date_created, ...)
user (user_id, name, ...)

THE PROBLEM:
As my provider is still using mysql4.0x without subselects, i want to
do this in one query BUT I HAVE NO CLUE HOW TO DO IT!!! In general, it
looks like a simple JOIN operation, but how do I get mysql to show only
the username / datetime of THE LAST post of EACH thread???

Any help is highly appreciated
Thanks a lot!!

Philipp

Reply With Quote