mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
implement history actions tray, add history search feature
This commit is contained in:
parent
5927f00437
commit
970f8f6497
3 changed files with 225 additions and 12 deletions
|
|
@ -74,17 +74,26 @@ class Database
|
|||
}
|
||||
|
||||
public function getHistory(
|
||||
string $search = '',
|
||||
int $start = 0,
|
||||
int $limit = 1000
|
||||
): array
|
||||
{
|
||||
$query = $this->_database->query(
|
||||
$query = $this->_database->prepare(
|
||||
sprintf(
|
||||
'SELECT * FROM `history` ORDER BY `id` DESC LIMIT %d,%d',
|
||||
'SELECT * FROM `history` WHERE `url` LIKE :search ORDER BY `id` DESC LIMIT %d,%d',
|
||||
$start,
|
||||
$limit
|
||||
)
|
||||
);
|
||||
|
||||
$query->execute(
|
||||
[
|
||||
':search' => sprintf(
|
||||
'%%%s%%',
|
||||
$search
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
return $query->fetchAll();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue