My plan for Export to CSV
My plan for Export to CSV
I need to export all rows matched by Datatables (not just the ones loaded in the dt control itself).
I was thinking the best way to do this, would be to save in a php session var, the complete SQL query used to pull the data, add a new custom Button to the datatables to make the request to php which will use the session var to create a unique temp file for the download.
Can anyone think of a simpler way where I would not have to code this? Would appreciate other suggestions. Maybe someone has done this already.
Thanks
This question has an accepted answers - jump to answer
Answers
That sounds like the correct approach to me. I wouldn't suggest saving the query into a session - just build the query again, but certainly having a custom button that will generate the CSV file on the server-side and then download it is the way to go.
Allan
Any chance you came up with a solution for this?