diff --git a/src/Model/Database/Auth.php b/src/Model/Database/Auth.php index f969683a..69df8b83 100644 --- a/src/Model/Database/Auth.php +++ b/src/Model/Database/Auth.php @@ -126,4 +126,30 @@ class Auth return $query->fetchAll(); } + + public function like( + string $request = '', + int $start = 0, + int $limit = 1000 + ): array + { + $query = $this->_connection->prepare( + sprintf( + 'SELECT * FROM `auth` + WHERE `request` LIKE :request + ORDER BY `request` ASC + LIMIT %d,%d', + $start, + $limit + ) + ); + + $query->execute( + [ + ':request' => $request + ] + ); + + return $query->fetchAll(); + } } \ No newline at end of file