From 20b42878f061a236305f7711a77fa0f908ed9684 Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 7 Apr 2023 04:08:46 +0300 Subject: [PATCH] add missed keywords index recording, fix #4 --- library/sqlite.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/sqlite.php b/library/sqlite.php index 8878986..9942d10 100644 --- a/library/sqlite.php +++ b/library/sqlite.php @@ -89,18 +89,18 @@ class SQLite { public function updatePage(int $pageId, string $title, string $description, string $keywords, string $data, int $timeUpdated) { - $query = $this->_db->prepare('UPDATE `page` SET `title` = ?, `description` = ?, `data` = ?, `timeUpdated` = ? WHERE `pageId` = ?'); + $query = $this->_db->prepare('UPDATE `page` SET `title` = ?, `description` = ?, `keywords` = ?, `data` = ?, `timeUpdated` = ? WHERE `pageId` = ?'); - $query->execute([$title, $description, $data, $timeUpdated, $pageId]); + $query->execute([$title, $description, $keywords, $data, $timeUpdated, $pageId]); return $query->rowCount(); } public function addPage(string $title, string $description, string $keywords, string $data, int $timeAdded) { - $query = $this->_db->prepare('INSERT INTO `page` (`title`, `description`, `data`, `timeAdded`) VALUES (?, ?, ?, ?)'); + $query = $this->_db->prepare('INSERT INTO `page` (`title`, `description`, `keywords`, `data`, `timeAdded`) VALUES (?, ?, ?, ?, ?)'); - $query->execute([$title, $description, $data, $timeAdded]); + $query->execute([$title, $description, $keywords, $data, $timeAdded]); return $this->_db->lastInsertId(); }