Customizing the "Showing X to Y of Z entries"

Customizing the "Showing X to Y of Z entries"

he110he110 Posts: 3Questions: 0Answers: 0
edited September 2011 in General
Hi,

I have a really big database and counting the results returned for a query takes a lot of time. I've modified the SQL query so that $iTotalDisplayRecords and $iTotal the minimum of either 10,001 or the number of records returned from the query. Having done this, how do change it so that string below the table says "Showing 1 to 10 of more than 10,000 entries" instead of "Showing 1 to 10 of 10,000 entries" in the case $iTotalDisplayRecords ( = $iTotal) is greater than or equal to 10,001.

I've tried just replacing the (integer) variables with the string "more than 10,000 entries", but then it gets replaced by NaN.

Replies

  • he110he110 Posts: 3Questions: 0Answers: 0
    bump :)
  • allanallan Posts: 63,531Questions: 1Answers: 10,475 Site admin
    http://datatables.net/usage/callbacks#fnInfoCallback is what you are looking for :-)

    Allan
  • he110he110 Posts: 3Questions: 0Answers: 0
    Excellent, thanks! :)
This discussion has been closed.