diff --git a/MysqliDb.php b/MysqliDb.php index 5697702a..00e01f83 100644 --- a/MysqliDb.php +++ b/MysqliDb.php @@ -1865,7 +1865,7 @@ public function map($idField) public function paginate ($table, $page, $fields = null) { $offset = $this->pageLimit * ($page - 1); $res = $this->withTotalCount()->get ($table, Array ($offset, $this->pageLimit), $fields); - $this->totalPages = round($this->totalCount / $this->pageLimit); + $this->totalPages = ceil($this->totalCount / $this->pageLimit); return $res; } }