I'm attempting to use DataTables Server Side Processing
Currently I'm getting 1000 rows back (as display) even though the display is set to 10, 25, etc
jQuery:
$(document).ready(function() {
$('#paginatedTableSS').dataTable( {
"processing": true,
"serverSide": true,
"ajax": "script.php"
} );
} );
script.php:
$i = 0;
$test = array();
$test['draw'] = 1;
$test['recordsTotal'] = 200000;
$test['recordsFiltered'] = 8;
$test['data'] = array();
while($i<=20){
array_push($test['data'], ['test1 ' . $i, 'test2 ' . $i, 'test3 ' . $i, 'test4 ' . $i]);
$i=$i+1;
}
echo json_encode($test);
My ultimate goal is to pass along start
to the script so the script can use that to give the correct data back. But currently I need to fix the above before moving forward I think. But I'm not sure what's wrong with it or how to debug it.