Codeigniter 4 Pagination With Join and Where sql |
(06-24-2022, 03:35 AM)kenjis Wrote:(06-24-2022, 12:28 AM)demyr Wrote: I believe limit and offset cannot solve the problem since offset creates a starting point until it reaches limit, am I right? says: "return only 10 records, start on record 16 (OFFSET 15)" on w3school Because it returned me the items only between offset and limit and nothing else. For example, if it was set for 7,15 It starts from 16 + 7 items and same items for each pagination 1-2-3-4.. No different result. And if I fetch data from my Model, your codes below have no effect: PHP Code: $page = (int) ($this->request->getGet('page') ?? 1); If I don't fetch data from Model but do it in my controller , like in the example below, then it works. But not in a healthy way for me because it is not my exact sql with joins . PHP Code: $model = new \App\Models\AdminModels\OffersModel(); |
Welcome Guest, Not a member yet? Register Sign In |