add missing operator

This commit is contained in:
Akinwale Ariwodola 2019-10-15 22:39:27 +01:00
parent c18431394c
commit 007cf0d34c

View file

@ -150,10 +150,13 @@ class MainController extends AppController {
$startLimitId = $maxClaimId - ($page * $pageLimit); $startLimitId = $maxClaimId - ($page * $pageLimit);
$endLimitId = $startLimitId + $pageLimit; $endLimitId = $startLimitId + $pageLimit;
if ($endLimitId > $maxClaimId) {
$endLimitId = $maxClaimId;
}
$claims = $this->Claims->find()->select($this->Claims)-> $claims = $this->Claims->find()->select($this->Claims)->
select(['publisher' => 'C.name'])->leftJoin(['C' => 'claim'], ['C.claim_id = Claims.publisher_id'])-> select(['publisher' => 'C.name'])->leftJoin(['C' => 'claim'], ['C.claim_id = Claims.publisher_id'])->
where(['Claims.id >' => $startLimitId, 'Claims.id <=' => $endLimitId]) where(['Claims.id >' => $startLimitId, 'Claims.id <=' => $endLimitId])->
order(['Claims.id' => 'DESC'])->toArray(); order(['Claims.id' => 'DESC'])->toArray();
for ($i = 0; $i < count($claims); $i++) { for ($i = 0; $i < count($claims); $i++) {