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); }