title: datatable server side processing gives error
body: <p>I am new in codeigniter-4 and i am inplementing datatable server side processing.</p>
  <p>I found following error:</p>
  <blockquote>
  <p>&quot;DataTables warning: table id=admin_user_datatable - Requested unknown
  parameter '0' for row 0, column 0. For more information about this
  error, please see <a href="http://datatables.net/tn/4%22" rel="nofollow noreferrer">http://datatables.net/tn/4&quot;</a></p>
  </blockquote>
  <p>After this error, data is loading in server table.</p>
  <p>controller:</p>
  <pre><code>    public function ajaxDataTables()
      { 
           
              $params['draw'] = @$_POST['draw'];
              $start = @$_POST['start'];
              $length = @$_POST['length'];
              $search_value = @$_POST['search']['value'];
  
             if(!empty($search_value)){
                  $total_count = $this-&gt;db-&gt;query(&quot;SELECT employee_name,employee_email,employee_phone from users WHERE id like '%&quot;.$search_value.&quot;%' OR employee_name like '%&quot;.$search_value.&quot;%' OR  employee_email like '%&quot;.$search_value.&quot;%' OR employee_phone like '%&quot;.$search_value.&quot;%'&quot;)-&gt;getResult();
  
                  $data = $this-&gt;$db-&gt;query(&quot;SELECT employee_name,employee_email,employee_phone from users WHERE id like '%&quot;.$search_value.&quot;%' OR employee_name like '%&quot;.$search_value.&quot;%' OR employee_email like '%&quot;.$search_value.&quot;%' OR employee_phone like '%&quot;.$search_value.&quot;%' limit $start, $length&quot;)-&gt;getResult();
  
              }else{
                  // count all data
                  $total_count = $this-&gt;db-&gt;query(&quot;SELECT employee_name,employee_email,employee_phone from users&quot;)-&gt;getResult();
  
                  // get per page data
                  $data = $this-&gt;db-&gt;query(&quot;SELECT employee_name,employee_email,employee_phone from users limit $start, $length&quot;)-&gt;getResult();
              }
              $no = @$_POST['start'];
              foreach ($data as $employee) {
                  $no++;
                  $row = array();
                  $row[] = $no;
                  $row[] = $employee-&gt;employee_name;
                  $row[] = $employee-&gt;employee_email;
                  $row[] = $employee-&gt;employee_phone;
                  $row[] ='&lt;a href=&quot;&quot;&gt;&lt;span class=&quot;role member&quot;&gt;Update&lt;/span&gt;&lt;/a&gt; || &lt;a href=&quot;&quot;&gt;&lt;span class=&quot;role admin&quot;&gt;Delete&lt;/span&gt;&lt;/a&gt;';
                  $data[] = $row;
              }
  
              $json_data = array(
              &quot;draw&quot; =&gt; @$_POST['draw'],
              &quot;recordsTotal&quot; =&gt; count($total_count),
              &quot;recordsFiltered&quot; =&gt; count($total_count),
              &quot;data&quot; =&gt; $data   // total data array
              );
  
              echo json_encode($json_data);
  }
  
  &lt;script&gt;
  
      var site_url = &quot;&lt;?php echo site_url(); ?&gt;&quot;;
  
      $(document).ready( function () {
  
          $('#admin_user_datatable').DataTable({
            paginationType: &quot;full_numbers&quot;,
            lengthMenu: [[5, 10, 15, 20], [5, 10, 15, 20]],
            processing: true,
            serverSide: true,
            scrollY: &quot;400px&quot;,
            scrollCollapse: true,
            ajax: {
              url: site_url + &quot;/ajax-datatable&quot;, // json datasource
              type: &quot;post&quot;,
              data: {
                // key1: value1 - in case if we want send data with request
              }
            },
            columnDefs: [
              { orderable: false, targets: [0] }
            ],
            bFilter: true, // to display datatable search
          });
      });
    &lt;/script&gt;
  </code></pre>