title: DataTables warning: table id=big_table - Requested unknown parameter '0' for row 0.
body: <p><img src="https://i.stack.imgur.com/86sGO.png" alt="enter image description here"></p>
  
  <p>I'm working with the jquery datatables plugin and codeigniter , while trying to follow (roughly ) <a href="http://www.ahmed-samy.com/php-codeigniter-full-featrued-jquery-datatables-part-1/" rel="nofollow noreferrer">http://www.ahmed-samy.com/php-codeigniter-full-featrued-jquery-datatables-part-1/</a>. I am getting the following error:</p>
  
  <pre><code>DataTables warning: table id=big_table - Requested unknown parameter '0' for row 0. For more information about this error, please see http://datatables.net/tn/4
  </code></pre>
  
  <p>In firebug there are no errors and the following JSON is returned:</p>
  
  <pre><code>{"draw":0,"recordsTotal":3,"recordsFiltered":3,"data":[{"id":"2","message_id":"&lt;047d7bf1665e40753c04fd394d72@google.com&gt;","subject":"Delivery Status Notification (Failure)","date":"2014-07-02 19:34:17"},{"id":"3","message_id":"&lt;ad86a2fb8673b8a6.14044068.406744.354605.en-US.b5df177c74ea@google.com&gt;","subject":"Flying the red, white and blue on YouTube","date":"2014-07-03 19:01:21"},{"id":"4","message_id":"&lt;047d7bf1665e04fd640c89@google.com&gt;","subject":"Delivery Status Notification (Failure)","date":"2014-07-04 22:34:16"
  </code></pre>
  
  <p>i notice that the draw is 0 even though the number of records (3) is correct. The table itself its empty.</p>
  
  <p>How can I fix this?</p>
  
  <p>My controller:</p>
  
  <p>function index()
          {</p>
  
  <pre><code>        //set table id in table open tag
          $tmpl = array('table_open' =&gt; '&lt;table id="big_table" border="1" cellpadding="2" cellspacing="1" class="mytable"&gt;');
          $this-&gt;table-&gt;set_template($tmpl);
  
  
          $this-&gt;table-&gt;set_heading("id,message_id,subject,date");
  
          $this-&gt;load-&gt;view('serversidetestview');
      }
  
      //function to handle callbacks
  
      function datatable()
      {
  
          $this-&gt;datatables-&gt;select("id,message_id,subject,date")-&gt;from('imap');
          echo $this-&gt;datatables-&gt;generate();
      }    
  </code></pre>
  
  <p>My view:</p>
  
  <pre><code>&lt;html&gt; 
    &lt;head&gt; 
        &lt;base href="&lt;?=base_url();?&gt;"&gt;
  
         &lt;!-- DataTables CSS --&gt;
  
      &lt;link rel="stylesheet" type="text/css" href="http://cdn.datatables.net/1.10.1/css/jquery.dataTables.css"&gt;
  
      &lt;!-- jQuery --&gt;
  &lt;script type="text/javascript" charset="utf8" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js"&gt;&lt;/script&gt;
  
  &lt;!-- DataTables --&gt;
  
  &lt;script type="text/javascript" charset="utf8" src="http://cdn.datatables.net/1.10.1/js/jquery.dataTables.min.js"&gt;&lt;/script&gt;    
  
  
  
    &lt;/head&gt; 
    &lt;body&gt; 
  
  
  &lt;h1&gt;Subscriber management&lt;/h1&gt;
  &lt;?php echo $this-&gt;table-&gt;generate(); ?&gt;
  &lt;/div&gt;
  &lt;script type="text/javascript"&gt;
      $(document).ready(function () {
          var oTable = $('#big_table').dataTable({
              "bProcessing": true,
              "bServerSide": true,
              "sAjaxSource": 'datatable_controller/datatable',
              "bJQueryUI": true,
              "sPaginationType": "full_numbers",
              "iDisplayStart ": 20,
  
              "fnInitComplete": function () {
                  oTable.fnAdjustColumnSizing();
              },
              'fnServerData': function (sSource, aoData, fnCallback) {
                  $.ajax
                  ({
                      'dataType': 'json',
                      'type': 'POST',
                      'url': sSource,
                      'data': aoData,
                      'success': fnCallback
                  });
              }
          });
      });
  &lt;/script&gt;
  
    &lt;/body&gt; 
  &lt;/html&gt; 
  </code></pre>