mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2025-01-23 13:14:17 +00:00
add magnet timeUpdated support, add updateMagnetXl method
This commit is contained in:
parent
535378fa64
commit
5b9e5e9f25
@ -595,7 +595,8 @@ class Database {
|
|||||||
bool $comments,
|
bool $comments,
|
||||||
bool $sensitive,
|
bool $sensitive,
|
||||||
bool $approved,
|
bool $approved,
|
||||||
int $timeAdded) : int {
|
int $timeAdded,
|
||||||
|
mixed $timeUpdated = null) : int {
|
||||||
|
|
||||||
$this->_debug->query->insert->total++;
|
$this->_debug->query->insert->total++;
|
||||||
|
|
||||||
@ -607,7 +608,8 @@ class Database {
|
|||||||
`comments` = ?,
|
`comments` = ?,
|
||||||
`sensitive` = ?,
|
`sensitive` = ?,
|
||||||
`approved` = ?,
|
`approved` = ?,
|
||||||
`timeAdded` = ?');
|
`timeAdded` = ?,
|
||||||
|
`timeUpdated` = ?');
|
||||||
|
|
||||||
$query->execute(
|
$query->execute(
|
||||||
[
|
[
|
||||||
@ -619,7 +621,8 @@ class Database {
|
|||||||
$comments ? 1 : 0,
|
$comments ? 1 : 0,
|
||||||
$sensitive ? 1 : 0,
|
$sensitive ? 1 : 0,
|
||||||
$approved ? 1 : 0,
|
$approved ? 1 : 0,
|
||||||
$timeAdded
|
$timeAdded,
|
||||||
|
$timeUpdated
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -705,6 +708,17 @@ class Database {
|
|||||||
return $query->fetch()->result;
|
return $query->fetch()->result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function updateMagnetXl(int $magnetId, int $xl, int $timeUpdated) : int {
|
||||||
|
|
||||||
|
$this->_debug->query->update->total++;
|
||||||
|
|
||||||
|
$query = $this->_db->prepare('UPDATE `magnet` SET `xl` = ?, `timeUpdated` = ? WHERE `magnetId` = ?');
|
||||||
|
|
||||||
|
$query->execute([$xl, $timeUpdated, $magnetId]);
|
||||||
|
|
||||||
|
return $query->rowCount();
|
||||||
|
}
|
||||||
|
|
||||||
public function updateMagnetDn(int $magnetId, string $dn, int $timeUpdated) : int {
|
public function updateMagnetDn(int $magnetId, string $dn, int $timeUpdated) : int {
|
||||||
|
|
||||||
$this->_debug->query->update->total++;
|
$this->_debug->query->update->total++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user