add related to image hostpages limit

This commit is contained in:
ghost 2023-05-04 10:17:47 +03:00
parent adc791f378
commit 34b7291228

View File

@ -234,9 +234,9 @@ class MySQL {
return $query->rowCount();
}
public function getHostImageHostPages(int $hostImageId) {
public function getHostImageHostPages(int $hostImageId, int $limit = 5) {
$query = $this->_db->prepare('SELECT * FROM `hostImageToHostPage` WHERE `hostImageId` = ?');
$query = $this->_db->prepare('SELECT * FROM `hostImageToHostPage` WHERE `hostImageId` = ? LIMIT ' . (int) $limit);
$query->execute([$hostImageId]);