Topic: [mysql] how does the table topics work?

ok... punbb_topics has the following fields

id
poster
subject
posted
last_post
last_post_id
last_poster
num_views
num_replies
closed
sticky
moved_to
forum_id

I just want to know how to associate, with a JOIN, the first post (from punbb_posts) to the topic?

(ps, something like the first_post_id field in phpBB)

Re: [mysql] how does the table topics work?

Oooh, I did this before...
Use posted and the post time with the topic id and post topic?

Re: [mysql] how does the table topics work?

so instead of an id: date and time?!

Re: [mysql] how does the table topics work?

Once I get home I'll pull the code I use

Re: [mysql] how does the table topics work?

select [columns] from forum_topics as ft inner join forum_posts as fp on ft.id = fp.topic_id where ft.posted = fp.posted

Just change forum_ to punbb_

Oh yes, and I normally use LIMIT 5 and restrict it to a certain forum