Skip to content

Commit

Permalink
Merge pull request #372 from perftools/371-limit
Browse files Browse the repository at this point in the history
PDO: Fix swapped limit and offset parameters
  • Loading branch information
glensc committed Nov 10, 2020
2 parents 449e89c + 06d7c66 commit de7498a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Xhgui/Db/PdoRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ public function findByUrl(string $url, string $direction, int $skip, int $perPag
LIMIT %d OFFSET %d',
$this->table,
$direction,
$skip,
$perPage
$perPage,
$skip
);
$stmt = $this->pdo->prepare($query);
$stmt->execute(['url' => '%' . $url . '%']);
Expand Down

0 comments on commit de7498a

Please sign in to comment.