php - Datatables server-side error when I click to access 5th page -


i'm using datatables 1.10.15. it's working when click on button 5th page received error message: datatables warning: table id=tabela1 - invalid json response. more information error, please see 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 use $table = 'clientes';  // table's primary key $primarykey = 'cpf_cnpj';  // array of database columns should read , sent datatables. // `db` parameter represents column name in database, while `dt` // parameter represents datatables column identifier. in 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 want use basic configuration datatables php  * server-side, there no need edit below line.  */  require( '../include/ssp.php' );  echo json_encode(     ssp::simple( $_get, $sql_details, $table, $primarykey, $columns ) );  ?> 

could situation?

regards.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -