My plan for Export to CSV

My plan for Export to CSV

wyattbikerwyattbiker Posts: 25Questions: 14Answers: 0

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

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin
    Answer ✓

    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

  • CaldagaCaldaga Posts: 24Questions: 6Answers: 0

    Any chance you came up with a solution for this?

This discussion has been closed.