aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmd/dump.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/dump.go b/cmd/dump.go
index ddc26e8..769c4bc 100644
--- a/cmd/dump.go
+++ b/cmd/dump.go
@@ -1,5 +1,5 @@
/* guestbook - Standalone guestbook server for static websites
- * Copyright (C) 2025 Vidhu Kant Sharma <vidhukant@vidhukant.com>
+ * Copyright (C) 2025-2026 Vidhu Kant Sharma <vidhukant@vidhukant.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -44,7 +44,7 @@ var dumpCmd = &cobra.Command{
conn := db.Connect()
defer conn.Close()
- rows, err := conn.Query(fmt.Sprintf("SELECT name, website, message, time FROM %s", guestbookName))
+ rows, err := conn.Query(fmt.Sprintf("SELECT name, website, message, time FROM %s ORDER BY time DESC", guestbookName))
if err != nil {
log.Fatal(err)
}