add push events support

This commit is contained in:
ghost 2023-09-15 01:43:20 +03:00
parent 7c054557f3
commit 64693f7774
5 changed files with 151 additions and 24 deletions

View file

@ -1444,6 +1444,17 @@ class Database {
return $this->_db->lastInsertId();
}
public function getMagnetStar(int $magnetStarId) {
$this->_debug->query->select->total++;
$query = $this->_db->prepare('SELECT * FROM `magnetStar` WHERE `magnetStarId` = ?');
$query->execute([$magnetStarId]);
return $query->fetch();
}
public function getMagnetStars() {
$this->_debug->query->select->total++;
@ -1533,6 +1544,17 @@ class Database {
return $this->_db->lastInsertId();
}
public function getMagnetDownload(int $magnetDownloadId) {
$this->_debug->query->select->total++;
$query = $this->_db->prepare('SELECT * FROM `magnetDownload` WHERE `magnetDownloadId` = ?');
$query->execute([$magnetDownloadId]);
return $query->fetch();
}
public function getMagnetDownloads() {
$this->_debug->query->select->total++;
@ -1629,6 +1651,17 @@ class Database {
return $query->fetchAll();
}
public function getMagnetView(int $magnetViewId) {
$this->_debug->query->select->total++;
$query = $this->_db->prepare('SELECT * FROM `magnetView` WHERE `magnetViewId` = ?');
$query->execute([$magnetViewId]);
return $query->fetch();
}
public function getMagnetViewsTotal() : int {
$this->_debug->query->select->total++;