Welcome Guest, Not a member yet? Register   Sign In
CI 4 pagination

From past few days I have started working in CI4, I would like to know how pagination works with below query?

1. $query = $this->db->query("select * from users");
$result =  $query->getResultArray();

Using model is working as expected find below query
2. $data = [
            'users' => $this->users->where('active', '1')->paginate(4),
            'pager' => $this->users->pager

But facing issue with above 1st query result set. Could you please help me out to resolve this issue

Thank you in advance.

Messages In This Thread
CI 4 pagination - by Masood - 12-29-2019, 05:19 AM

Theme © iAndrew 2016 - Forum software by © MyBB