mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
add deleteHistory method
This commit is contained in:
parent
f8114f57a5
commit
40973fd4d7
1 changed files with 14 additions and 0 deletions
|
|
@ -102,6 +102,20 @@ class Database
|
||||||
return $query->fetchAll();
|
return $query->fetchAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function deleteHistory(
|
||||||
|
int $id
|
||||||
|
): int
|
||||||
|
{
|
||||||
|
$query = $this->_database->query(
|
||||||
|
sprintf(
|
||||||
|
'DELETE FROM `history` WHERE `id` = %d',
|
||||||
|
$id
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
return $query->rowCount();
|
||||||
|
}
|
||||||
|
|
||||||
public function cleanHistory(
|
public function cleanHistory(
|
||||||
int $timeout = 0
|
int $timeout = 0
|
||||||
): int
|
): int
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue