This commit is contained in:
parent
63cc2b9e1a
commit
9ce2f42e1c
@ -8,7 +8,6 @@ class Article {
|
|||||||
$db = getenv("MYSQL_DB");
|
$db = getenv("MYSQL_DB");
|
||||||
$user = getenv("MYSQL_USER");
|
$user = getenv("MYSQL_USER");
|
||||||
$pass = getenv("MYSQL_PASS");
|
$pass = getenv("MYSQL_PASS");
|
||||||
|
|
||||||
return new Article($host, $db, $user, $pass);
|
return new Article($host, $db, $user, $pass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -22,7 +21,7 @@ class Article {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getAllPosts() {
|
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);
|
return mysqli_fetch_all($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user