Populating a DataTable
Populating a DataTable
I am trying to populate a datatable from my database with php/mysql. All is well it works but it is really slow.
If I limit the rows in the query it is great.
I don't have much knowledge of javascript, and was just wondering if someone could help me out. Is it possible to limit on page load, add a button for next page that will requery and repopulate without page loading again?
I'm only trying to retrieve 2000 rows, if there is another way to speed things up, your help would be much appreciated.
Oh, I also want to be able to use the sorting and search facility so ideally the whole database has to be loaded...
If I limit the rows in the query it is great.
I don't have much knowledge of javascript, and was just wondering if someone could help me out. Is it possible to limit on page load, add a button for next page that will requery and repopulate without page loading again?
I'm only trying to retrieve 2000 rows, if there is another way to speed things up, your help would be much appreciated.
Oh, I also want to be able to use the sorting and search facility so ideally the whole database has to be loaded...
This discussion has been closed.
Replies
Alternatively you can add html buttons to show first 1000, second 1000 or so, using GET method connected with the page and using the "LIMIT row, rows" part of the SELECT query. Same can be done with a SELECT and JavaScript "onchange".
But you will never sort/filter all data with these records.
@abuk13 - How are you loading the data? HTML or Ajax or Ajax + server-side processing? I'd suggest Ajax with deferred rendering enabled for just 2000 records.
Allan