From 17cffc6ad682b6063dbcf778be3336fdbf5224ea Mon Sep 17 00:00:00 2001 From: Cflip <36554078+cflip@users.noreply.github.com> Date: Sat, 23 Jan 2021 00:21:31 -0700 Subject: Order topics from newest to oldest --- category.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/category.php b/category.php index b2f6dbd..b444ef3 100644 --- a/category.php +++ b/category.php @@ -27,7 +27,7 @@ mysqli_free_result($result); echo ''; -$sql = "SELECT topic_id, topic_subject, topic_date, user_name FROM topics LEFT JOIN users ON topic_author = user_id WHERE topic_cat = " . mysqli_real_escape_string($dbc, $_GET['id']); +$sql = "SELECT topic_id, topic_subject, topic_date, user_name FROM topics LEFT JOIN users ON topic_author = user_id WHERE topic_cat = " . mysqli_real_escape_string($dbc, $_GET['id']) . " ORDER BY topic_id DESC"; $result = mysqli_query($dbc, $sql); if (!$result) { -- cgit v1.2.3