title: jQuery Datatable - server side processing data pagination using Php
body: <p>i have a problem with jquery datatable pagination (Server side processing).</p>
  
  <p>For example i have a <code>24</code> records in database. The count is displaying correctly and total pagination also displaying correctly. </p>
  
  <p><img src="https://i.stack.imgur.com/WTihs.png" alt="enter image description here"> </p>
  
  <p>when i click on <code>Next or 2nd page</code> it displays records as per the display page length.<img src="https://i.stack.imgur.com/1XvCl.png" alt="enter image description here"></p>
  
  <p>Here <code>3rd Page</code> last 4 records are not displayed. </p>
  
  <p>Here my server side code is like this</p>
  
  <pre><code>$this-&gt;db-&gt;select("SQL_CALC_FOUND_ROWS user_id,user_name,email", FALSE);
  
          $this-&gt;db-&gt;from("users");
       $sTable="users";
          // Data set length after filtering
          $this-&gt;db-&gt;select('FOUND_ROWS() AS found_rows');
          $iFilteredTotal = $this-&gt;db-&gt;get('users')-&gt;row()-&gt;found_rows;
  
          // Total data set length
          $iTotal = $this-&gt;db-&gt;count_all($sTable);
  
  
          // Output
          $output = array(
              'sEcho' =&gt; intval($sEcho),
              'iTotalRecords' =&gt; $iTotal,
              'iTotalDisplayRecords' =&gt; $iFilteredTotal,
              'aaData' =&gt; array()
          );
  </code></pre>
  
  <p>Client side Code like this</p>
  
  <pre><code>$(document).ready(function () {
          $('#data_appraiser').dataTable({
              "bProcessing": true,
              "bServerSide": true,
              "oLanguage": {
                  "sProcessing": imgsrc,
              },
              //"aaData": data.aaData,
               "iDisplayLength": 10,
               "aLengthMenu": [
                               [10, 25, 50],
                               [10, 25, 50] // change per page values here
                           ],
                  "aaSorting": [[0, 'asc']],
                  "sServerMethod": "POST",
                      "sAjaxSource": "appraiserlistajaxdata",
  
              "sPaginationType": "full_numbers"
              "aoColumns": [
                  { "mData": "id" },
                  { "mData": "appraiser_name" },
                  { "mData": "user_name" }
                 ....
              ]        
          });
      });
  </code></pre>
  
  <p>I checked with <code>$iFilteredTotal</code> total count.when the page changes the value is <code>20</code>.If it is in <code>1st page</code> the value is <code>24</code>.i am unable to solve this problem. Sorry if my problem was weired.Could any one help me how to resolve this issue. Thanks</p>