No matching records found
No matching records found
Greetings,
I am facing a strange problem and I am unable to figure out where I am possibly going wrong. I have datatables enabled with server side processing that fetches data from MySQL database. It works perfect with 15 columns. The moment I add the 16th column, I get "No matching records found". However, at the bottom of the page I get "Showing 1 to 10 of 88 entries" and the pagination is also showing pages 1 to 9.
Is there any limitation on the number of columns that are allowed to be displayed? Any help or pointers in the direction to resolve this issue will be helpful.
Thank you.
Answers
Datatables debug link: http://debug.datatables.net/uneruh
Below is my JS:
$(document).ready(function() { $('#dataTables-example').dataTable( { "processing": true, "responsive": true, "serverSide": true, "order": [[ 0, "desc" ]], "ajax": "/scripts/server_processing_invoices.php", "aoColumnDefs": [ { "aTargets": [14], "mData": "null", "mRender": function (data, type, full) { return ''+ full[14] +''; } } ], dom: 'T<"clear">lfrtip', tableTools: { "sSwfPath": "/scripts/copy_csv_xls_pdf.swf", "aButtons": [ "xls" ] } }); });Below is my server side script:
$columns = array(
array( 'db' => 'DateTime', 'dt' => 0 ),
array( 'db' => 'InvoiceID', 'dt' => 1 ),
array( 'db' => 'Carrier', 'dt' => 2 ),
array( 'db' => 'InvoiceType', 'dt' => 3 ),
array( 'db' => 'InvoicePayer', 'dt' => 4 ),
array( 'db' => 'ShipmentType', 'dt' => 5 ),
array( 'db' => 'BLNumber', 'dt' => 6 ),
array( 'db' => 'ClearingAgent', 'dt' => 7 ),
array( 'db' => 'MobileNo', 'dt' => 8 ),
array( 'db' => 'EmailAdd', 'dt' => 9 ),
array( 'db' => 'Comments', 'dt' => 10 ),
array( 'db' => 'InternalComments', 'dt' => 11 ),
array( 'db' => 'Owner', 'dt' => 12 ),
array( 'db' => 'ContainerList', 'dt' => 13 ),
array( 'db' => 'FileName', 'dt' => 14 ),
array( 'db' => 'FilePath', 'dt' => 15 ),
);
Hello guys,
Help/pointers in the direction that will help me resolve this issue will be very much appreciated.
Dhyanesh
Hello Allan,
May I please request your assistance on this? I have been struggling to get this working. If I change "targets": [15] to render more than 16 columns, I get "No matching records found". However, at the bottom of the page, it shows "Showing 1 to 10 of 326 entries (filtered from 15,989 total entries)".
Any help/pointers to resolve this issue would be very helpful.
Thank you.
Since you are using server-side processing, all of the filtering is being done at the server-side. The debug trace you linked to shows that the following is being returned:
i.e. no data. That is way DataTables is showing now data :-)
So the issue needs to be addressed in your
"ajax": "/scripts/server_processing_invoices.php",
script.Allan