Server side Datatables connection
Hi I have purchased the Metronic 8.1.5v recently and I need to have my Datatables populated with the server side mySQL data which I already have.
I am not able to get clear instructions on how to point my Datatables to my server side database and its corresponding table.
I understand I should write a separate server side script, but not able to get the correction information on the same on where to write and how to do it.
I am using the HTML version
Thank you for your interest in Metronic.
To use the datatables plugin with server side data source you can refer to the official documentation here.
You can also check Metronic's example of the Datatables server-side processing here. Please note that this example uses custom PHP code as example and you should implement your own server-side code referring to the above official docs.
If we can help with anything else please let us know.
With you server side processing example, if I understand correctly...
the HTML points to the JS, where the data is supposed collected via Ajax from DataTables.php, which in turn connects to class-utils.php.... but no where it links to the database on server... where is that info on how to connect to database on server?
Our examples are for demo purposes the database connection is not used. Since it's the example for the HTML theme the database and backend implementation is not covered. We just simulate the data source generation using PHP.
In your case you just need to refer to the Datatables docs and understand the parameters structure for request/response for the server side data processing. Then you can implement your own implementation according to project requirements.