Exporting records
Permalink
I don't remember where, but I know I saw Franz say somewhere that when he needs a large number of records exported from a form stored in the dashboard he has someone pull the data directly from the MySQL db. Can anyone shed some light on how to do this in an organized fashion - because right now whenever I try to export records to an Excel file from the dashboard the page times out before the file is created/downloaded and it's causing the server to crash.
I'm dealing with forms that have 1k+ records, some with large amounts of data.
I'm dealing with forms that have 1k+ records, some with large amounts of data.
If you'd know something about coding this stuff I think it would be a great help for the community if you tried to tackle this one. Probably your server is crashing because of out-of-memory exception from PHP. And again, that is probably because the excel export (looking currently at the code) does not use any kinds of output buffering that would be cleared/flushed up at some points of the export. The whole thing is saved into the default concrete5 output buffer which might cause problems with low memory and thousands of records (as you said).
Probably a simple output buffering there that would use less of the server's memory would solve this problem. Other place to lower the memory usage would be probably to split the queries to smaller chunks together with the output buffering.
If you're not familiar with this stuff, I'd suggest using some kind of GUI to connect to your database (I personally use HeidiSQL). There are simple exporting tools available for queries you've made.
You can find out the queries made to do this stuff from:
The tables you should be interested in are:
- btFormQuestions
- btFormAnswers
Best,
Antti / Mainio