From 1353bd271a54ff0e506c37cef0377299e45bd8b3 Mon Sep 17 00:00:00 2001 From: Alexander Butenko Date: Tue, 17 Nov 2015 00:57:48 +0300 Subject: [PATCH] paginate: replace round() with ceil() --- MysqliDb.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } }