Datatable with very large data set from MySQL DB

Datatable with very large data set from MySQL DB

mehdikmehdik Posts: 7Questions: 0Answers: 0

Hello,

I tried the following discussion and still couldn't figure out, how can I prevent loading all the data from DB.
http://datatables.net/forums/discussion/8789/tips-for-using-datatables-with-very-large-data-sets

When I browse my server-side HTML file, it doesn't consider the number of results per page and it shows like thousands of the records in the first page and all the browsers stop responding. I've even tried on a local computer with all local services and same result. The current table which I'm trying to pull the data from has almost 50,000 rows which shouldn't be any problem according to the above discussion.

Here's a sample link which connects to that table:
http://66.49.143.49/dt/examples/data_sources/server_side.html

Thanks in advance,

Replies

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    Your browser's console info will show you an error:

    "ReferenceError: table is not defined" in server_side.html.

  • mehdikmehdik Posts: 7Questions: 0Answers: 0

    Thanks for your reply, tangerine,

    How can I fix this issue, if the browser doesn't crash, it shows the data in a very long table, like thousands in each page. Where can I find this table definition in server_side.html.

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    Use your browser's console info.

  • mehdikmehdik Posts: 7Questions: 0Answers: 0

    Sorry I'm newbie in coding, how can find the solution in browser's console info? I tried to test it with 100 rows on my local machine and it worked, but the problem is that it shows all 100 record in each page (at the bottom it shows 10 page). What setting should I look for to fix this problem.

    Thanks for your patience,

  • mehdikmehdik Posts: 7Questions: 0Answers: 0

    I just changed "ajax" to "sAjaxSource" in my script and it seems to solve the problem, why it didn't detect the number of entries per page before? :-/

  • mehdikmehdik Posts: 7Questions: 0Answers: 0

    Now I have a problem with the Search boxes for each column, could you please take a look and let me know what I'm missing in these search boxes and how can I change only one of those boxes to 'select input' instead of 'text input'.

    Thanks again,

This discussion has been closed.