Datatables for Codeigniter 3 |
(11-30-2022, 12:30 PM)superior Wrote: There is a library available maybe this makes it easier for you? Thanks man this solution is perfect and really easy to use ![]() I use it this way in model/controller because of logic that i don't want to do in model. I hope this will help someone. My model: PHP Code: $this->datatables->select('Id, Title, Plate'); My controller: PHP Code: $data = []; My view, ajax: Code: var table = $('#data-table').DataTable({ (12-01-2022, 12:19 AM)InsiteFX Wrote: This may also help you out. I tried this code and this one is too much to write or to place in function for reuse, also those 3 lines throwing error because default when you load table you doesn't have indexes set of PHP Code: $postData['order'] If someone wants to use this you need to check for PHP Code: isset($_POST['order']) PHP Code: $rowperpage = $postData['length']; // Rows display per page |
Messages In This Thread |
Datatables for Codeigniter 3 - by brianjamestorr - 11-30-2022, 10:44 AM
RE: Datatables for Codeigniter 3 - by superior - 11-30-2022, 12:30 PM
RE: Datatables for Codeigniter 3 - by brianjamestorr - 12-01-2022, 09:06 AM
RE: Datatables for Codeigniter 3 - by InsiteFX - 12-01-2022, 12:19 AM
|