Welcome Guest, Not a member yet? Register   Sign In
Using the built-in pagination functions
#4

OK, I will use the query builder intead.
But that raises a new question....
In my controller I now have this:
PHP Code:
//used session to remember the searched value when browsing to another page in paginator
$logs $loggingModel->like('request'$this->session->get('loggingSearch') ?? '')->orderBy('insert_date''DESC')->paginate(20); 
But if I can (and should????) do this is the controller, do I need any queries at all in the Model? Or do I only specify the used table, etc.?
My Logging Model now only has a createLogging() and deleteLogging() method. These are easily converted to the query builder and put into the controller, but should I?
And what are the pro's of using the query builder over $this->db.->query?
Reply


Messages In This Thread
RE: Using the built-in pagination functions - by sjender - 01-21-2022, 12:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB