I have a post table and a reply table. both tables have a created column which record when it is being created. and the post table have a last_reply_created and is updated whenever a reply made to a post with that post id.
first question: in the posts page, I want to display all posts that sorted by whichever last_reply_created or created in post table comes first.
second question: Can you design the post and reply table better regarding this problem?
My workaround is to insert last_reply_created whenever a post is created.