Server side processing loads all records

Server side processing loads all records

adamschubertadamschubert Posts: 2Questions: 1Answers: 0
edited March 2021 in Free community support

Link to test case: http://test.schubertadam.hu/
Debugger code (debug.datatables.net):
Error messages shown: no error message
Description of problem: I use the original code from https://datatables.net/examples/server_side/simple.html and of course edited the lines I needed for my code. I also delete the 4 lines from ssp.class.php. My problem is as you can see that the whole table is loaded at once instead of just the required lines. I did not edited anything, but just in case, there is my javascript code

$(document).ready(function () {
     $('#dataTable').DataTable({
       'processing': true,
       'serverside': true,
        "ajax": {
         "url": "test.php",
         "type": "POST"
        },
      'columns': [
          {data: 'id'},
          {data: 'firstname'},
          {data: 'username'},
          {data: 'status'},
      ]
    });
  });

Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

This question has accepted answers - jump to:

Answers

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    Answer ✓

    That is the expected behaviour from server-side processing.

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    Answer ✓

    You've spelt serverSide wrong - note the camel case - so as you say, it's defaulting to standard behaviour.

    Colin

  • adamschubertadamschubert Posts: 2Questions: 1Answers: 0

    Thank you colin and sorry, I did not recognised it :disappointed: Now it is perfect, thank you

This discussion has been closed.