Browse Source

add deleteHistory method

PHP-GTK3
yggverse 7 months ago
parent
commit
40973fd4d7
  1. 14
      src/Model/Database.php

14
src/Model/Database.php

@ -102,6 +102,20 @@ class Database @@ -102,6 +102,20 @@ class Database
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(
int $timeout = 0
): int

Loading…
Cancel
Save