• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pagination with Join Query

Hi, maybe it's as simple as I am missing something in the documentation and or my search criteria. I've played around with building queries, etc and can't seem to break this problem.

Could someone point me in the direction (via documentation/code sample/function) of how to join two models/tables and still be able to use pagination in CI 4? 

Thanks for any help that you may offer.

I think you would need to use manual pagination: https://codeigniter4.github.io/userguide...pagination
Test your translation files with Translation Tester

Most of the times you can intermingle calls with your model and the query builder together. So you should be able to do something like:

PHP Code:
$users $userModel->join('foo''foo.user_id = users.id')->paginate(); 

Thank you both. I have my answer.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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