I've set up my forum, and the table structure is as follows:
one table for topics (f1_topics), and one for replies (f1_replies)
f1_topics consits of:
author, title, body, posted, modified, timestamp, postid, replyid
f1_replies consists of:
author, title, body, posted, modified, timestamp, replyid, topicid
In each case, topicid and replyid link to the topic associated with the reply and the last reply posted, respectively. The other fields, I think, are self-explanatory.
What I want to do is:
When a new reply is posted, update the timestamp in the topics table with the timestamp of the most recent reply related to that topic. How would I go about doing that? If I used "UPDATE f1_topics SET timestamp", I'm guessing that wouldn't work. Seeing as it's an automatically updated field, would it need a value passed?
Also, would "SORT BY timestamp" sort the entries correctly, according to the time posted?
Help would be appreciated...