title: CodeIgniter Datatables Sorting, Searching not working
body: <p>please help me with this, I cannot figure out how to set up my codeigniter server side and datatable server side processing.
  Seems the data has been pushed through the tables but when I start searching and sorting columns, it is not working.</p>
  
  <p>Please see my code</p>
  
  <p><strong>CI Server Side Controller</strong></p>
  
  <pre><code>function admin_pages_datatable()
  {
      $start = $this-&gt;input-&gt;post("start");
      $length = $this-&gt;input-&gt;post("length");
      $draw = $this-&gt;input-&gt;post("draw");
      $query = $this-&gt;db-&gt;query("SELECT * FROM tbl_fe_pages LIMIT {$start}, {$length}");
      $query_count = $this-&gt;db-&gt;query("SELECT * FROM tbl_fe_pages");
      $query_count = $query_count-&gt;num_rows();
      $query = $query-&gt;result();
      $datatable = array();
      $s = 1;
      foreach($query as $row){
          $datatable["data"][] = array(
              $s++,$row-&gt;subject,$row-&gt;descriptions,$row-&gt;type,$row-&gt;status,'F'
          );
      }
  
      $datatable["draw"] = $draw;
      $datatable["recordsTotal"] = 10;
      $datatable["recordsFiltered"] = $query_count;
      return json_encode($datatable);
  }
  </code></pre>
  
  <p><strong>Javascript</strong></p>
  
  <pre><code>var table_items_all = $('#data').dataTable({
              "aaSorting": [[ 2, "desc" ]],
              "scrollY"           : "300px",
              "scrollCollapse"    : true,
              "processing"        : true,
              "serverSide"        : true,
              "ajax": {
                  "url" : "http://localhost/myproject/maintenance/admin_pages_datatable",
                  "type" : "POST"
              },
              "language": {
                  "emptyTable":     "My Custom Message On Empty Table"
              },
              "aoColumns": 
              [
                  null, null, null, null, null, {sClass: 'controls'}
              ],
  
          }); 
  </code></pre>
  
  <p><strong>Thank you very much for the help :D</strong></p>