From 9ce2f42e1ce6d76c71330b83e78e4640748a43a1 Mon Sep 17 00:00:00 2001 From: Tyler Perkins Date: Tue, 27 Dec 2022 21:50:57 -0500 Subject: [PATCH] Update article layout --- src/common/article.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/common/article.php b/src/common/article.php index 1778198..618d50c 100644 --- a/src/common/article.php +++ b/src/common/article.php @@ -8,7 +8,6 @@ class Article { $db = getenv("MYSQL_DB"); $user = getenv("MYSQL_USER"); $pass = getenv("MYSQL_PASS"); - return new Article($host, $db, $user, $pass); } @@ -22,7 +21,7 @@ class Article { } public function getAllPosts() { - $result = mysqli_query($this->client, 'SELECT * FROM post'); + $result = mysqli_query($this->client, 'SELECT * FROM post ORDER BY created DESC'); return mysqli_fetch_all($result); }