Can’t export to CSV
-
Hi!
Thanks for the great plugin.
I’m having a slight issue with exporting to CSV. I have created two tables with your plugin. CSV export works fine for this:add_db_table_editor( array( 'title'=>'Committee', 'table'=>'ssbc_committee', 'id_column'=>'ID', 'sql'=>'SELECT * FROM ssbc_committee ORDER BY EndYear DESC' ) );
But not for this (I get “This page isn’t working ssbc.org.uk is currently unable to handle this request. HTTP ERROR 500”):
add_db_table_editor( array( 'title'=>'BCD prices', 'table'=>'ssbc_postmeta', 'id_column'=>'meta_id', 'sql'=> "select post_id, max(IF(meta_key LIKE 'attribute_pre-drinks', meta_value, NULL)) AS 'Pre-drinks', max(IF(meta_key LIKE 'attribute_dinner-drinks', meta_value, NULL)) AS 'Dinner drinks', max(IF(meta_key LIKE 'attribute_post-drinks', meta_value, NULL)) AS 'Post-drinks', sum(IF(meta_key LIKE '_regular_price', meta_value, NULL)) AS 'Price' from ssbc_postmeta WHERE post_id IN (SELECT ID FROM ssbc_posts WHERE post_parent = 3692) GROUP BY post_id" ) ); }
Is it an issue with the length of the query? Is there any way round this?
Thank you!
Lois
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Can’t export to CSV’ is closed to new replies.