title: DataTables warning, Requested unknown parameter 'ID' for row 0, column 0
body: <p>I'm getting this warning working with Datatables with server side processing, &quot;DataTables warning: table id=kt_datatable - Requested unknown parameter 'ID' for row 0, column 0.&quot;, the database name is &quot;Facturas&quot; and has the columns:&quot; id,tipo,cif_nif,numero_factura,fecha_desde,fecha_hasta,importe_desde,importe_hasta&quot;</p>
  <p>this is the html part:</p>
  <pre><code>&lt;table class=&quot;table table-bordered table-hover table-checkable&quot; id=&quot;kt_datatable&quot;&gt;
                              &lt;thead&gt;
                            &lt;tr&gt;
                                            &lt;th&gt;ID&lt;/th&gt;
                                            &lt;th&gt;Tipo&lt;/th&gt;
                                            &lt;th&gt;CIF / NIF&lt;/th&gt;
                                            &lt;th&gt;N Factura&lt;/th&gt;
                                            &lt;th&gt;Cliente&lt;/th&gt;
                                            &lt;th&gt;Fecha desde&lt;/th&gt;
                                            &lt;th&gt;Fecha hasta&lt;/th&gt;
                                            &lt;th&gt;Importe Desde&lt;/th&gt;
                                            &lt;th&gt;Importe Hasta&lt;/th&gt;
                                            
                                            &lt;th&gt;Actions&lt;/th&gt;
                                &lt;/tr&gt;
                  &lt;/thead&gt;
  
  
                      &lt;tfoot&gt;
              &lt;tr&gt;
                                    &lt;th&gt;ID&lt;/th&gt;
                                    &lt;th&gt;Tipo&lt;/th&gt;
                                    &lt;th&gt;CIF / NIF&lt;/th&gt;
                                    &lt;th&gt;N Factura&lt;/th&gt;
                                    &lt;th&gt;Cliente&lt;/th&gt;
                                    &lt;th&gt;Fecha desde&lt;/th&gt;
                                    &lt;th&gt;Fecha hasta&lt;/th&gt;
                                    &lt;th&gt;Importe Desde&lt;/th&gt;
                                    &lt;th&gt;Importe Hasta&lt;/th&gt;
                                    &lt;th&gt;Actions&lt;/th&gt;
                          &lt;/tr&gt;
              &lt;/tfoot&gt;
              &lt;/table&gt;
  </code></pre>
  <p>and this is the javascript part:</p>
  <pre><code>$.fn.dataTable.Api.register('column().title()', function() {
      return $(this.header()).text().trim();
  });
  
  var initTable1 = function() {
      // begin first table
      var table = $('#kt_datatable').DataTable({
          responsive: true,
          // Pagination settings
          dom: `&lt;'row'&lt;'col-sm-12'tr&gt;&gt;
          &lt;'row'&lt;'col-sm-12 col-md-5'i&gt;&lt;'col-sm-12 col-md-7 dataTables_pager'lp&gt;&gt;`,
          // read more: https://datatables.net/examples/basic_init/dom.html
  
          lengthMenu: [5, 10, 25, 50],
  
          pageLength: 10,
  
          language: {
              'lengthMenu': 'Display _MENU_',
          },
  
          searchDelay: 500,
          processing: true,
          serverSide: true,
          ajax: {
              url: 'server-side.php',
              type: 'POST',
              data: {
                  // parameters for custom backend script demo
                  columnsDef: [
                      'ID','tipo', 'cif_nif', 'numero_factura', 'cliente', 'fecha_desde',
                      'fecha_hasta', 'importe_desde', 'importe_hasta', 'Actions',],
              }, 
          },
          columns: [
              {data: 'ID'},
              {data: 'tipo'},
              {data: 'cif_nif'},
              {data: 'numero_factura'},
              {data: 'cliente'},
              {data: 'fecha_desde'},
              {data: 'fecha_hasta'},
              {data: 'importe_desde'},
              {data: 'importe_hasta'},
              {data: 'Actions', responsivePriority: -1},
          ],
          columnDefs: [
              {
                  targets: -1,
                  title: 'Actions',
                  orderable: false,
                  render: function(data, type, full, meta) {
                      return '\
                          &lt;div class=&quot;dropdown dropdown-inline&quot;&gt;\
                              &lt;a href=&quot;javascript:;&quot; class=&quot;btn btn-sm btn-clean btn-icon&quot; data-toggle=&quot;dropdown&quot;&gt;\
                                  &lt;i class=&quot;la la-cog&quot;&gt;&lt;/i&gt;\
                              &lt;/a&gt;\
                              &lt;div class=&quot;dropdown-menu dropdown-menu-sm dropdown-menu-right&quot;&gt;\
                                  &lt;ul class=&quot;nav nav-hoverable flex-column&quot;&gt;\
                                      &lt;li class=&quot;nav-item&quot;&gt;&lt;a class=&quot;nav-link&quot; href=&quot;#&quot;&gt;&lt;i class=&quot;nav-icon la la-edit&quot;&gt;&lt;/i&gt;&lt;span class=&quot;nav-text&quot;&gt;Edit Details&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;\
                                      &lt;li class=&quot;nav-item&quot;&gt;&lt;a class=&quot;nav-link&quot; href=&quot;#&quot;&gt;&lt;i class=&quot;nav-icon la la-leaf&quot;&gt;&lt;/i&gt;&lt;span class=&quot;nav-text&quot;&gt;Update Status&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;\
                                      &lt;li class=&quot;nav-item&quot;&gt;&lt;a class=&quot;nav-link&quot; href=&quot;#&quot;&gt;&lt;i class=&quot;nav-icon la la-print&quot;&gt;&lt;/i&gt;&lt;span class=&quot;nav-text&quot;&gt;Print&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;\
                                  &lt;/ul&gt;\
                              &lt;/div&gt;\
                          &lt;/div&gt;\
                          &lt;a href=&quot;javascript:;&quot; class=&quot;btn btn-sm btn-clean btn-icon&quot; title=&quot;Edit details&quot;&gt;\
                              &lt;i class=&quot;la la-edit&quot;&gt;&lt;/i&gt;\
                          &lt;/a&gt;\
                          &lt;a href=&quot;javascript:;&quot; class=&quot;btn btn-sm btn-clean btn-icon&quot; title=&quot;Delete&quot;&gt;\
                              &lt;i class=&quot;la la-trash&quot;&gt;&lt;/i&gt;\
                          &lt;/a&gt;\
                      ';
                  },
              },
          
          ],
      });
  </code></pre>
  <p>and the server side php code is this (example was taken from datatables.net):</p>
  <pre><code>                   &lt;?php
  
                     // DB table to use
                    $table = 'facturas';
  
                    // Table's primary key
                    $primaryKey = 'id';
  
                    // 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' =&gt; 'id', 'dt' =&gt; 0 ),
                      array( 'db' =&gt; 'tipo', 'dt' =&gt; 1 ),
                      array( 'db' =&gt; 'cif_nif',  'dt' =&gt; 2 ),
                      array( 'db' =&gt; 'numero_factura',   'dt' =&gt; 3 ),
                      array( 'db' =&gt; 'cliente',     'dt' =&gt; 4 ),
  array(
      'db'        =&gt; 'fecha_desde',
      'dt'        =&gt; 5,
      'formatter' =&gt; function( $d, $row ) {
          return date( 'jS M y', strtotime($d));
      }
  ),
  array(
      'db'        =&gt; 'fecha_hasta',
      'dt'        =&gt; 6,
      'formatter' =&gt; function( $d, $row ) {
          return date( 'jS M y', strtotime($d));
      }
  ),
  array(
      'db'        =&gt; 'importe_desde',
      'dt'        =&gt; 7,
      'formatter' =&gt; function( $d, $row ) {
          return date( 'jS M y', strtotime($d));
      }
  ),
  array(
      'db'        =&gt; 'importe_hasta',
      'dt'        =&gt; 8,
      'formatter' =&gt; function( $d, $row ) {
          return date( 'jS M y', strtotime($d));
      }
  )
  );
  
                 // SQL server connection information
  
             $sql_details = array(
                           'user' =&gt; 'root',
                           'pass' =&gt; '',
                           'db'   =&gt; 'nubelo',
                           'host' =&gt; 'localhost'
                              );
  
  
                        require( 'ssp.class.php' );
  
                    echo json_encode(
                               SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns )
                                );
  
  
  
                ?&gt;
  </code></pre>
  <p>Thanks in advance for any help</p>