I'd like to use either the CSV Export or the XLS export actions but I need to export the results of a complex MySQL multiple-table query.
I have tried playing around with the code provided in another post ( http://www.chronoengine.com/forums.html?cont=posts&f=5&t=12071 ) but it doesn't work (it might be outdated since the first post is from 2008). I even tried the original code by just changing the table name but it does nothing.
I guess I could use the XLS export action but I am not sure how to save the results of the query in the $form->data array in the right way so it can be associated with a data path. I have tried setting the data path to lid and saving the results from my query placed in a custom code box with the following line:
but I only get one single item from the results in the xls file. What is the right way to do it?
David
I have tried playing around with the code provided in another post ( http://www.chronoengine.com/forums.html?cont=posts&f=5&t=12071 ) but it doesn't work (it might be outdated since the first post is from 2008). I even tried the original code by just changing the table name but it does nothing.
I guess I could use the XLS export action but I am not sure how to save the results of the query in the $form->data array in the right way so it can be associated with a data path. I have tried setting the data path to lid and saving the results from my query placed in a custom code box with the following line:
$form->data['liq'] = $db->loadAssocList();
but I only get one single item from the results in the xls file. What is the right way to do it?
David