The filtered “Approved” registrations CSV export with all data columns is very helpful, however I would like to run a few reports on the database, trimming out un-needed columns and making custom reports for my team.
I was wondering if you have a SQL query handy that will give me the same data as what gets exported in the CSV export.
I do not have an SQL query handy that would replicate CSV report. There are a lot of relationships between tables with that particular report, and Event Espresso 4 uses a model system which basically handles all the tricky SQL joins. So even if you look in the source, you will not see SQL queries there.
What you could do is install one of the plugins like WP_DEBUG bar and then add: define( 'SAVEQUERIES', true );
to your site’s wp-config.php file. Then when you run a report via the Registrations page, you can click on the Debug bar and view all the queries that just happened.
Or, if you’re really just looking to trim the columns, you can make use of the FHEE__EE_Export__report_registrations__reg_csv_array filter hook and have the unwanted columns trimmed away when you run the report from the UI.
Excellent! That is super helpful. Thanks as always, Josh.
Viewing 2 reply threads
The support post ‘Registrations CSV Export – SQL query’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.