|
|
@ -143,6 +143,7 @@ class MySQL { |
|
|
|
`hostPage`.`metaDescription`, |
|
|
|
`hostPage`.`metaDescription`, |
|
|
|
`hostPage`.`data`, |
|
|
|
`hostPage`.`data`, |
|
|
|
`hostPage`.`uri`, |
|
|
|
`hostPage`.`uri`, |
|
|
|
|
|
|
|
`hostPage`.`rank`, |
|
|
|
`host`.`scheme`, |
|
|
|
`host`.`scheme`, |
|
|
|
`host`.`name`, |
|
|
|
`host`.`name`, |
|
|
|
`host`.`port` |
|
|
|
`host`.`port` |
|
|
@ -204,6 +205,22 @@ class MySQL { |
|
|
|
return $query->rowCount(); |
|
|
|
return $query->rowCount(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function updateHostPageRank(int $hostId, |
|
|
|
|
|
|
|
int $crc32uri, |
|
|
|
|
|
|
|
int $increment) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$query = $this->_db->prepare('UPDATE `hostPage` SET `rank` = `rank` + ' . (int) $increment . ' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WHERE `hostId` = ? |
|
|
|
|
|
|
|
AND `crc32uri` = ? |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LIMIT 1'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$query->execute([$hostId, $crc32uri]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $query->rowCount(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function deleteHostPage(int $hostPageId) { |
|
|
|
public function deleteHostPage(int $hostPageId) { |
|
|
|
|
|
|
|
|
|
|
|
$query = $this->_db->prepare('DELETE FROM `hostPage` WHERE `hostPageId` = ? LIMIT 1'); |
|
|
|
$query = $this->_db->prepare('DELETE FROM `hostPage` WHERE `hostPageId` = ? LIMIT 1'); |
|
|
|