Browse Source

add missed keywords index recording, fix #4

sqliteway
ghost 2 years ago
parent
commit
20b42878f0
  1. 8
      library/sqlite.php

8
library/sqlite.php

@ -89,18 +89,18 @@ class SQLite { @@ -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();
}

Loading…
Cancel
Save