mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-04-01 17:45:31 +00:00
add new methods
This commit is contained in:
parent
99c98b6089
commit
5909fcaf4a
1 changed files with 22 additions and 0 deletions
|
|
@ -575,6 +575,17 @@ class Database {
|
||||||
return $query->rowCount();
|
return $query->rowCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function updateUserTimeUpdated(int $userId, int $timeUpdated) : int {
|
||||||
|
|
||||||
|
$this->_debug->query->update->total++;
|
||||||
|
|
||||||
|
$query = $this->_db->prepare('UPDATE `user` SET `timeUpdated` = ? WHERE `userId` = ?');
|
||||||
|
|
||||||
|
$query->execute([$timeUpdated, $userId]);
|
||||||
|
|
||||||
|
return $query->rowCount();
|
||||||
|
}
|
||||||
|
|
||||||
// Magnet
|
// Magnet
|
||||||
public function addMagnet(int $userId,
|
public function addMagnet(int $userId,
|
||||||
int $xl,
|
int $xl,
|
||||||
|
|
@ -648,6 +659,17 @@ class Database {
|
||||||
return $query->fetch()->result;
|
return $query->fetch()->result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function findMagnet(int $userId, int $timeAdded) {
|
||||||
|
|
||||||
|
$this->_debug->query->select->total++;
|
||||||
|
|
||||||
|
$query = $this->_db->prepare('SELECT * FROM `magnet` WHERE `userId` = ? AND `timeAdded` = ?');
|
||||||
|
|
||||||
|
$query->execute([$userId, $timeAdded]);
|
||||||
|
|
||||||
|
return $query->fetch();
|
||||||
|
}
|
||||||
|
|
||||||
public function findMagnetsByUserId(int $userId) {
|
public function findMagnetsByUserId(int $userId) {
|
||||||
|
|
||||||
$this->_debug->query->select->total++;
|
$this->_debug->query->select->total++;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue