summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCflip <36554078+cflip@users.noreply.github.com>2021-01-23 00:21:31 -0700
committerCflip <36554078+cflip@users.noreply.github.com>2021-01-23 00:21:31 -0700
commit17cffc6ad682b6063dbcf778be3336fdbf5224ea (patch)
tree5b394ef06990512dd70d99eea91adb764bee2517
parent3fe84d427cb4fa85df101426a1d8ce99e6b3991b (diff)
Order topics from newest to oldest
-rw-r--r--category.php2
1 files changed, 1 insertions, 1 deletions
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 '</section>';
-$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) {