From 61e0fba181e910c73c9fe889d976a37e51f7c7a6 Mon Sep 17 00:00:00 2001 From: Tyler Perkins Date: Fri, 23 Dec 2022 16:13:35 -0500 Subject: [PATCH] Make DOA query functions public --- src/common/article.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/article.php b/src/common/article.php index 91dff2d..fe6cee0 100644 --- a/src/common/article.php +++ b/src/common/article.php @@ -25,17 +25,17 @@ class Article { $this->client = mysqli_connect($host, $user, $pass, $db); } - function getAllPosts() { + public function getAllPosts() { $result = mysqli_query($this->client, 'SELECT * FROM post'); return mysqli_fetch_all($result); } - function getMostRecentPosts($limit){ + public function getMostRecentPosts($limit){ $result = mysqli_query($this->client, 'SELECT * FROM post ORDER BY created DESC LIMIT ' . $limit); return mysqli_fetch_all($result); } - function getPostData($postId) { + public function getPostData($postId) { $result = mysqli_query($this->client, 'SELECT * FROM post WHERE ID = ' . $postId); return mysqli_fetch_all($result); }