From 6d0fd13ea555176c90c466ac93afa9bb33ca6018 Mon Sep 17 00:00:00 2001
From: ENGO150 <v.smejkal06@gmail.com>
Date: Fri, 24 May 2024 19:02:19 +0200
Subject: [PATCH] ordering posts by time added

---
 res/forum/api/get_posts.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/res/forum/api/get_posts.php b/res/forum/api/get_posts.php
index 036917b..d0037a7 100644
--- a/res/forum/api/get_posts.php
+++ b/res/forum/api/get_posts.php
@@ -15,7 +15,7 @@ if ($out -> num_rows != 1)
     return;
 }
 
-$out = $database -> query("SELECT title, description, photo_id FROM post");
+$out = $database -> query("SELECT title, description, photo_id FROM post ORDER BY id DESC");
 
 $output = array();