PROBLEMS WITH TOTAL RECORDS AND RECORDS SHOWN IN EVERY PAGE

PROBLEMS WITH TOTAL RECORDS AND RECORDS SHOWN IN EVERY PAGE

alberdiezalberdiez Posts: 2Questions: 0Answers: 0
edited November 2012 in General
Hello everybody, I need your help.

I am trying to use the plugin Datatable and the function full_numbers.

I have the next problem:

I draw 50 records per page and the total records are 5000 more and less.

I use the property iDisplayLenght= 50 and iTotalRecords=5000 but the plugin always draw 50 records

I want the plugin to draw me something as this and it shows me 50 records per page:

1 of 5000 entries and the number of pages are 1..100

Best Regards

I hope your answers

Replies

  • girishmrgirishmr Posts: 137Questions: 0Answers: 0
    Assumption: Usage of MySQL DB and PHP

    Can you recheck your record count query and the query which draws the actual records based on conditions you would have provided?
    Check the value returned from the following query

    [code]
    "SELECT FOUND_ROWS()"
    [/code]

    Check what values are you getting into these variables in your server side script.
    [code]
    "iTotalRecords" => $iTotal,
    "iTotalDisplayRecords" => $iFilteredTotal,

    [/code]
  • alberdiezalberdiez Posts: 2Questions: 0Answers: 0
    I have to return from my database 50 records per page one called to query per page when the datatable is loaded.
    I can't return everydata because the number of data can become more than 100.000 records and it can be very slow, for this reason only can load 50 records by page in each load of datatable.
    On the other hand I have to draw number of Entries total of this query in the message that I posted you before and I need to draw the total of number of pages.
    For this I have another query, it return me the number total of entries.

    Best Regards
This discussion has been closed.