• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI 4 pagination

#1
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.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.