Errors using ssp.class.php

Errors using ssp.class.php

oldandslowoldandslow Posts: 1Questions: 1Answers: 0

I was following the server side processing example and trying to load data from a mysql database into a table. My table is working fine if I load data via php, but I need to be able to pull data in with js and this seemed like the easiest way. I am using php 7 and mysql 5.7 in case that has any bearing on the issue. Here are some of the details.

Datatable Initialize

function load() {
$('#items').DataTable({
"processing": true,
"serverSide": true,
"ajax": "loadTest.php",
})

    };

loadTest.php

$table = 'items_orig';

$primaryKey = 'id';

$columns = array(
array( 'db' => 'id', 'dt' => 0 ),
array( 'db' => 'col1', 'dt' => 1 ),
array( 'db' => 'col2', 'dt' => 2 ),
array( 'db' => 'col3', 'dt' => 3 ),
array( 'db' => 'col4', 'dt' => 4 ),
array( 'db' => 'col5', 'dt' => 5 ),
array( 'db' => 'col6', 'dt' => 6 ),
array( 'db' => 'col7', 'dt' => 7 )
);

$sql_details = array(
'user' => 'xxxxxx',
'pass' => 'xxxxxx',
'db' => 'xxxxxxx',
'host' => 'localhost'
);

require( 'ssp.class.php' );

echo json_encode(
SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns )


I am seeing the following errors in the browser debug when I try to load the table (pic attached).

This discussion has been closed.