From 246ae9bffc87334f49b79696335f52f257a6a910 Mon Sep 17 00:00:00 2001 From: Jenkings Date: Fri, 12 Jan 2024 06:36:16 +0000 Subject: [PATCH] Update Pages.php --- models/Pages.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/models/Pages.php b/models/Pages.php index b657952..1e152c2 100644 --- a/models/Pages.php +++ b/models/Pages.php @@ -179,7 +179,8 @@ class Pages { $maxResult = $maxQuery->fetch(PDO::FETCH_ASSOC); $max = ($maxResult['max'] * 1) + 1; - $dataQuery = $this->conn->prepare("SELECT title,link FROM ".$this->pageTable.""); + $dataQuery = $this->conn->prepare("SELECT title,link FROM ".$this->pageTable." WHERE id = :id"); + $dataQuery->bindParam("id", $this->id); $dataQuery->execute(); $dataResult = $dataQuery->fetch(PDO::FETCH_ASSOC);