title: My pagination script is not working, its stuck at "Processing..."
body: <p>I am using this codes for my script in search module, I don't know what did I do wrong because last week it is still working. Can anyone help me fix this one?</p>
  
  <p>These images shows the result from echo and print_r to keep track of the data that I am receiving.</p>
  
  <p>this is my "echo $qString;" showing the response from my datepicker
  <a href="https://i.stack.imgur.com/AFCGN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AFCGN.png" alt="enter image description here"></a></p>
  
  <p>and these 2 images shows the result of the search but it is not displaying on the webpage
  <a href="https://i.stack.imgur.com/idXwr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/idXwr.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/Gc4JP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Gc4JP.png" alt="enter image description here"></a></p>
  
  <p>here is the whole code for my model and script.</p>
  
  <pre><code>    function srch_gen048($data){
  
      $sEcho = intval($data["sEcho"]);
      $iDisplayStart = intval($data["iDisplayStart"]); //start of record
      $iDisplayLength = intval($data["iDisplayLength"]); //display size
      $pageNum = ($iDisplayStart/$iDisplayLength)+1; //page num
      $colSort = $data['iSortCol_0'];
      $dirSort = strtoupper($data['sSortDir_0']);
  
  
      $qString = "dbo.SEARCH_gen048 ";
      $qString .= "" . $colSort . ",";
      $qString .= "'" . $dirSort . "',";
      $qString .= "" . $pageNum . ",";
      $qString .= "" . $iDisplayLength . ","; 
      $qString .= "" . $sEcho . ",";
      $qString .= "'" . $data['sfDate'] . "'";
  
      //echo $qString;
  
      $this-&gt;db-&gt;query('set ansi_padding on
          set ARITHABORT on
          set CONCAT_NULL_YIELDS_NULL on
          set QUOTED_IDENTIFIER on
          set ANSI_NULLS on
          set ANSI_WARNINGS on
          set numeric_roundabort off');
  
      $res = $this-&gt;db-&gt;query($qString);
      $res = $res-&gt;result();
  
      $iTotalDisplayRecords   = 0;
      $iTotalRecords          = 0;
      if(count($res) &gt; 0)
      {
          $iTotalDisplayRecords = intval($res[0]-&gt;TOTAL_ROWS); //used for paging/numbering; same with iTotalRecords except if there will be search filtering
          $iTotalRecords = intval($res[0]-&gt;TOTAL_ROWS); //total records unfiltered
      }
  
  //print_r($res);
  
      $output = array(
          "sEcho" =&gt; intval($sEcho),
          "iTotalRecords" =&gt; $iTotalRecords,
          "iTotalDisplayRecords" =&gt; $iTotalDisplayRecords,
          "aaData" =&gt; array()
  
      );
  
  
  
      if(count($res) &gt; 0)
      {
          foreach($res as $row)
          {
  
  
                                  $output['aaData'][] = array(
                                          $row-&gt;accnum,
                                          $row-&gt;accname,
                                          $row-&gt;add1,
                                          $row-&gt;accdate,
                                          $row-&gt;rmcode,
                                          $row-&gt;add4,
                                          $row-&gt;solcode,
  
                                          );
  
          }
      }
  
  
  //print_r($output)
  
      return json_encode( $output );
  
  }
  </code></pre>
  
  <p>and this is for my script, I think its working properly since the model and controller is the only codes that I've edited since the last time that it is working.</p>
  
  <pre><code>&lt;script&gt;
  
  
  
  $(document).ready( function () {
  
  
  
      $('#acctable').dataTable({
                                  "sPaginationType": "full_numbers",
                                  "bAutoWidth": false,
                                  "bFilter": false,
                                  "bProcessing": true,
                                  "bLengthChange": false,
                                  "bServerSide": true,
                                  "sAjaxSource": "&lt;?php echo site_url() ?&gt;/welcome/get_gen048",
                                  "sServerMethod": "GET",
                                  "fnServerData": function (sSource, aoData, fnCallback ) {
                                      aoData.push( { "name": "sfDate" , "value": "&lt;?php echo $_POST["sfDate"] ?&gt;" } );
                                          $.getJSON( sSource, aoData, function (json) {
  
                                          fnCallback(json);
  
  
                                      } );
                                  },
                                  "aoColumns": [
                                                { "sClass": "leftAligned" , "bSortable" : true, "bAutoWidth": false },
                                                { "sClass": "rightAligned"    , "bSortable" : true, "bAutoWidth": false },
                                                { "sClass": "rightAligned"    , "bSortable" : true, "bAutoWidth": false },
                                                { "sClass": "rightAligned"    , "bSortable" : true, "bAutoWidth": false },
                                                { "sClass": "rightAligned"    , "bSortable" : true, "bAutoWidth": false },
                                                { "sClass": "rightAligned"    , "bSortable" : true, "bAutoWidth": false },
                                                { "sClass": "rightAligned"    , "bSortable" : true, "bAutoWidth": false }
  
                                                ]   
  
                              }); // oTable   
  
  } );
  
  &lt;/script&gt;
  </code></pre>