sql - Need help with Join -


So I'm trying to create a simple platform. This list of topics is either the date of the topic in descending order (if any No answer) or in the latest reply. Here is the DB structure:

topic
id, subject, date, poster

mail
id, topic_id, message, date, poster

The forum will contain an HTML table with the following headers:
topics | Last post | Answer:

What will be the query or questions to produce such a structure? I was thinking that it would include a cross join, but not sure ... thanks in advance.

Of course you can do a query for this, but I will give you the subject table field 'replies 'And' last post ', then update them on every new post. It can actually increase the speed of your database, not now, but at the time when you have thousands of topics.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -