The relational columns are named 'tid' and 'bid', topic and board ID.
And after looking at the results of the above query, it seems like that isn't working correctly either.
What I want to do is find out which topics on the boards a user has posted in, and then display only those topics, in order of the last post.
The two main problems I am having are:
- Only displaying each topic once. As it is now, if the user has posted 2+ times in a topic, it will show up on the posted messages list 2+ times.
- Sorting by the last post in the topic.
The posts table also has a timestamp field, so it may or may not be a requisite to join the topic table; I'm not sure of how I would go about doing it.
Basically, my tables (or at least the relevant parts) look something like this:
boards_topics
tid [topic id]
bid [board id]
lastpost [last post time in the topic]
boards_posts
tid [topic id]
posttime [time of the post]
Thanks for the help and let me know if there is any other information I am omitting.