How can I sort the topic replies by date

Hmmm, thanks for the reply. I did think about using a script a while ago but since Discourse has a lot of table relationships I decided to go through the API. But is there any way to create a script that will insert data in one table and then Discourse handles the rest of the relationship? That might make things easier for me.