Export to CSV with fieldnames not custom display names

nassausky

Member
Hi all,

Getting much done here. Maybe someone knows the trick without me having to dig around longer to find out the trick.

Question: Can I replace in the code (I guess business_logic.php) the export file to include the actual MySQL field names instead of the display names I have setup for the browse results.

Solution: Around line 5447 in business_loginc.php (I probably made a bit of corrections to that file so can't say line number)

[pre]
Original: $csv .= "\"".str_replace("\"", "\"\"", $fields_labels_ar[$i]["label_field"])."\"".$csv_separator;
Modified: $csv .= "\"".str_replace("\"", "\"\"", $fields_labels_ar[$i]["name_field"])."\"".$csv_separator;
[/pre]


Sorry I got the solution posted above as I quickly went back to dig through the code a second time hoping it was as easy as it is.

Thanks,


Should I be in this forum writing programs if I have to use my fingers to count to answer the simple spam prevention security question :)
 

eugenio

Administrator
Staff member
nassausky Wrote:
-------------------------------------------------------
> Hi all,
>
> Getting much done here. Maybe someone knows the
> trick without me having to dig around longer to
> find out the trick.
>
> Question: Can I replace in the code (I guess
> business_logic.php) the export file to include the
> actual MySQL field names instead of the display
> names I have setup for the browse results.

Ok, so I think you got a working solution, right?


> Should I be in this forum writing programs if I
> have to use my fingers to count to answer the
> simple spam prevention security question :)

Ahah, maybe not! :)
 
Top