I have to build a data table from server side because I have more than 200k rows, and I don't have the choice I need to make it from an execute statement like:
$result['draw']=1;
$temp = BD::query('SELECT * FROM `ersmessages` WHERE 1 LIMIT 10');
$result['recordsTotal'] = sizeof($temp);
$result['recordsFiltered'] = sizeof($temp);
$result['data'] = $temp;
But when I'm doing this that does not page my results and for 200k rows it's giving an error. If I limit the query that works but on one page.
My JS looks like:
$('#tableAllMessages').DataTable( {
"processing": true,
"serverSide": true,
"paging": true,
"searching": { "regex": true },
"lengthMenu": [ [10, 25, 50, 100, -1], [10, 25, 50, 100, "All"] ],
"pageLength": 10,
"ajax": "req/getAllMessages.php"
} );
How should I proceed to have a paged data table with 200k rows? I can't obviously use the ssp.