GC Enterprise v3.0.13
mySql 8 DB
What I want to do is to show some data on a webpage but when exporting into xls add more data from other tables.
This is a simplified example of what I’m trying to do
Table A
columns A, B, C, D
MySQL View V
columns A, B, C, D from table A
columns E, F, G from table B
$current_state = $crud->getState();
if ( ($current_state == 'Export') || ($current_state == 'ExportPdf') || ($current_state == 'Print') ) {
$crud->setTable('mysql_view_v');
$field_list = array('A','B','C','D','E','F','G');
$crud->setPrimaryKey('id','mysql_view_v');
} else {
$crud->setTable('table_a');
$field_list = array('A','B','C','D');
}
$crud->columns($field_list);
The problem is that in the mysql_view export I’ve got only the fields that are coming from table_a (so in this example A, B, C, D and not E, F, G)
If just for testing I change my code and in the main page I show a random table_b with fields completely different from the view, the export of the view is correct
} else {
$crud->setTable('table_b');
$field_list = array('X','Y','Z');
}
the same page worked fine on GCE 2.x
thanks