got error when returning one empty result on init
got error when returning one empty result on init
ocatrapisco
Posts: 1Questions: 0Answers: 0
the error I get:
[quote]
DataTables warning (table id = 'DataTables_Table_0'): Requested unknown parameter '1' from the data source for row 0
[/quote]
the init code:
[code]
var oTable = $('.some-listing').dataTable( {
"bJQueryUI": true,
"oLanguage":{
"sProcessing": "Procesando...",
"sLengthMenu": "Mostrar _MENU_ registros",
"sZeroRecords": "No se encontraron resultados",
"sEmptyTable": "Ningún dato disponible en esta tabla",
"sInfo": "Mostrando registros del _START_ al _END_ de un total de _TOTAL_ registros",
"sInfoEmpty": "Mostrando registros del 0 al 0 de un total de 0 registros",
"sInfoFiltered": "(filtrado de un total de _MAX_ registros)",
"sInfoPostFix": "",
"sSearch": "Buscar:",
"sUrl": "",
"sInfoThousands": ",",
"sLoadingRecords": "Cargando...",
"oPaginate": {
"sFirst": "Primero",
"sLast": "Último",
"sNext": "Siguiente",
"sPrevious": "Anterior"
},
"fnInfoCallback": null,
"oAria": {
"sSortAscending": ": Activar para ordernar la columna de manera ascendente",
"sSortDescending": ": Activar para ordernar la columna de manera descendente"
}
}
,"sPaginationType": "full_numbers"
,"bProcessing": true
,"bServerSide": true
//,"sAjaxDataProp": "data"
,"sAjaxSource": "/get_result"
,"iDeferLoading": "<?php if($results){ echo count($results); }else{ echo 0; } ?>"
}
} );
[/code]
the json it returns:
[code]
{"sEcho":1,"iTotalRecords":0,"iTotalDisplayRecords":0,"aaData":[]}
[/code]
any clues?
[quote]
DataTables warning (table id = 'DataTables_Table_0'): Requested unknown parameter '1' from the data source for row 0
[/quote]
the init code:
[code]
var oTable = $('.some-listing').dataTable( {
"bJQueryUI": true,
"oLanguage":{
"sProcessing": "Procesando...",
"sLengthMenu": "Mostrar _MENU_ registros",
"sZeroRecords": "No se encontraron resultados",
"sEmptyTable": "Ningún dato disponible en esta tabla",
"sInfo": "Mostrando registros del _START_ al _END_ de un total de _TOTAL_ registros",
"sInfoEmpty": "Mostrando registros del 0 al 0 de un total de 0 registros",
"sInfoFiltered": "(filtrado de un total de _MAX_ registros)",
"sInfoPostFix": "",
"sSearch": "Buscar:",
"sUrl": "",
"sInfoThousands": ",",
"sLoadingRecords": "Cargando...",
"oPaginate": {
"sFirst": "Primero",
"sLast": "Último",
"sNext": "Siguiente",
"sPrevious": "Anterior"
},
"fnInfoCallback": null,
"oAria": {
"sSortAscending": ": Activar para ordernar la columna de manera ascendente",
"sSortDescending": ": Activar para ordernar la columna de manera descendente"
}
}
,"sPaginationType": "full_numbers"
,"bProcessing": true
,"bServerSide": true
//,"sAjaxDataProp": "data"
,"sAjaxSource": "/get_result"
,"iDeferLoading": "<?php if($results){ echo count($results); }else{ echo 0; } ?>"
}
} );
[/code]
the json it returns:
[code]
{"sEcho":1,"iTotalRecords":0,"iTotalDisplayRecords":0,"aaData":[]}
[/code]
any clues?
This discussion has been closed.