I found in tablename_view a section called "Fields that can be displayed in the csv file" it starts with "$x->QueryFieldsCSV = array(".
I found I can modify the array and get the results I was looking for. I just commented out the fields I did not need.
It can be done dynamically by user if needed, but I don't have to for my needs.
The $query is a select statement with a where clause, I guess I could pass the filter info through the $arg if I can find where the call is made.
Thanks for the help.
Brian
Code: Select all
$x->QueryFieldsCSV = array(
"`time_entry`.`id`" => "id",
"if(`time_entry`.`Day`,date_format(`time_entry`.`Day`,'%m/%d/%Y'),'')" => "Day",
"`time_entry`.`Period`" => "Period",
// "TIME_FORMAT(`time_entry`.`StTime`, '%r')" => "StTime",
// "TIME_FORMAT(`time_entry`.`LnchStart`, '%r')" => "LnchStart",
// "TIME_FORMAT(`time_entry`.`LnchEnd`, '%r')" => "LnchEnd",
// "TIME_FORMAT(`time_entry`.`EndTime`, '%r')" => "EndTime",
"TIME_FORMAT(`time_entry`.`Hours`, '%h:%i')" => "Hours",
"`time_entry`.`Mileage`" => "Mileage",
"IF( CHAR_LENGTH(`vehicles1`.`Vehicle`), CONCAT_WS('', `vehicles1`.`Vehicle`), '') /* Vehicle */" => "Vehicle",
"`time_entry`.`Expenses`" => "Expenses",
"IF( CHAR_LENGTH(`projects1`.`Name`), CONCAT_WS('', `projects1`.`Name`), '') /* Project */" => "Project",
"`time_entry`.`Pay_Type`" => "Pay_Type",
"`time_entry`.`E_Name`" => "E_Name",
// "`time_entry`.`Memo`" => "Memo",
// "`time_entry`.`Job`" => "Job",
// "`time_entry`.`Recorded`" => "Recorded"
);