Datatables ошибка на стороне сервера, когда я нажимаю для доступа к 5-й странице

Я использую DataTables 1.10.15.
Это работает, но когда я нажимаю кнопку на 5-й странице, я получаю это сообщение об ошибке:
Предупреждение DataTables: table id = tabela1 — Неверный ответ JSON. Для получения дополнительной информации об этой ошибке, пожалуйста, см. http://datatables.net/tn/1

HTML:

<table id="tabela1">
<thead>
<tr>
<th>CPF/CNPJ</th>
<th>Nome</th>
<th>Telefone</th>
<th>Celular</th>
<th>E-mail</th>
<th><a rel="nofollow" href="inscliente.php"><span title="Inserir"></span></a></th>
<th>&nbsp;</th>
</tr>
</thead>
<tfoot>
<tr>
<th>CPF/CNPJ</th>
<th>Cliente</th>
<th>Telefone</th>
<th>Celular</th>
<th>E-mail</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
</tr>
</tfoot>
</table>

JS:

$(document).ready(function() {
$('#tabela1').DataTable( {
"processing": true,
"serverSide": true,
"ajax": "server_processing.php"} );
} );

PHP:

<?php

// DB table to use
$table = 'clientes';

// Table's primary key
$primaryKey = 'cpf_cnpj';

// Array of database columns which should be read and sent back to DataTables.
// The `db` parameter represents the column name in the database, while the `dt`
// parameter represents the DataTables column identifier. In this case simple
// indexes
$columns = array(
array( 'db' => 'cpf_cnpj', 'dt' => 0 ),
array( 'db' => 'nome',  'dt' => 1 ),
array( 'db' => 'telefone',   'dt' => 2 ),
array( 'db' => 'celular',     'dt' => 3 ),
array( 'db' => 'email',     'dt' => 4 ),
array( 'db' => 'cpf_cnpj',     'dt' => 5 ),
array( 'db' => 'stt',     'dt' => 6 )
);

// SQL server connection information
$sql_details = array(
'user' => '',
'pass' => '',
'db'   => '',
'host' => ''
);/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* If you just want to use the basic configuration for DataTables with PHP
* server-side, there is no need to edit below this line.
*/

require( '../include/ssp.php' );

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

?>

Не могли бы вы помочь с этой ситуацией?

С уважением.

0

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector