Non Ajax Pagination - PHP Pagination

Non Ajax Pagination - PHP Pagination

julesblimitedjulesblimited Posts: 1Questions: 0Answers: 0
edited March 2012 in General
Hi have a big database over 30K and data pulling from a few tables at once. Whole request has been written in PHP and works fine however DataTables pagination only works when I'm requesting all records at once and than paginate the results.

This is my code:

[code]

oTable = $('#dataTable').dataTable({
"bProcessing": true,
"bJQueryUI": true,
"bStateSave": true,
"bProcessing": true,
"bDisplayStart": 50,
"iDisplayLength": 25,
"aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
"aaSorting": [[1,'desc']],
"sPaginationType": "full_numbers"
});
[/code]

Is it any chance to have PHP pagination instead (Reload the page)? I would like to have SQL LIMIT and every new page will load just set amount of data instead all. I know there is server site version but this required to rewrite loads of the code and I'm trying to avoid that.

Thanks
Raf

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    Use server-side processing: http://datatables.net/release-datatables/examples/data_sources/server_side.html - it uses Ajax instead of reloading the whole page, but it allows you to do a LIMIT (indeed it is required) since all processing is done at the server.

    Allan
This discussion has been closed.