ServerSide:JSON response after two or three queries(advancing to different pages using Next Button)
ServerSide:JSON response after two or three queries(advancing to different pages using Next Button)
ServerSide:JSON response after two or three queries(advancing to different pages using Next Button) comes up with a invalid response alert .... suggestions?
My html file
<html>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/t/dt/jq-2.2.0,jszip-2.5.0,pdfmake-0.1.18,dt-1.10.11,af-2.1.1,b-1.1.2,b-colvis-1.1.2,b-flash-1.1.2,b-html5-1.1.2,b-print-1.1.2,cr-1.3.1,fc-3.2.1,fh-3.1.1,kt-2.1.1,r-2.0.2,rr-1.1.1,sc-1.4.1,se-1.1.2/datatables.min.css"/>
```<script type="text/javascript" src="https://cdn.datatables.net/t/dt/jq-2.2.0,jszip-2.5.0,pdfmake-0.1.18,dt-1.10.11,af-2.1.1,b-1.1.2,b-colvis-1.1.2,b-flash-1.1.2,b-html5-1.1.2,b-print-1.1.2,cr-1.3.1,fc-3.2.1,fh-3.1.1,kt-2.1.1,r-2.0.2,rr-1.1.1,sc-1.4.1,se-1.1.2/datatables.min.js"></script>```
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('#example').DataTable( {
"processing": true,
"serverSide": true,
"ajax": "server_processing.php",
"iDisplayLength": 50,
stateSave: true,
scrollY: '50vh',
paging: true,
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]]
} );
} );
</script>
```<table id="example" class="display" cellspacing="0" width="100%">```
``` <thead>```
``` <tr>```
``` <th>Article</th>```
``` <th>Reference</th>```
``` </tr>```
``` </thead>```
``` <tfoot>```
``` <tr>```
``` <th>Article</th>```
``` <th>Reference</th>```
``` </tr>```
``` </tfoot>```
``` </table>```
-------------------------------------------------------------------------------------------------------------------------------
my php file
```<?php```
``` ```
```$table = 'articles';```
```$primaryKey = 'id';```
``````
```$columns = array(```
``` array( 'db' => 'name', 'dt' => 0 ),```
``` array( 'db' => 'reference', 'dt' => 1 )```
```);```
$sql_details = array(
'user' => 'someuser',
'pass' => 'somepass',
'db' => 'somedb',
'host' => 'some.com'
);
require( 'ssp.class.php' );
``````
echo json_encode(
SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns )
);
The ssp.class.php is uploaded to the same working directory