column order in csv export file

Archived from the Xataface Users forum.

dynamic — Sat Jan 26, 2013 11:54 am

Hello,

I use export csv option but column order from csv file is different from what I set in fields.ini .
I speak about fields from “LEFT JOIN”

class tables_men_intreport {
<——><——>
function __sql__(){
<——>return “SELECT men_intreport.*,.
<——><——> men_zone.men_zone_name, men_uap.men_uap_name,
<——><——>FROM men_intreport LEFT JOIN men_zone ON men_zone_id = men_intreport_zone.
<——><——><——><——> LEFT JOIN men_uap ON men_uap_id = men_intreport_uap;
I define order in fields.ini to put [men_zone_name], [men_uap_name] at beginning in “list” and “new record”, and it is ok.
But in csv file this columns are at the end. How can solve this problem.

Thanks a lot,
Dan


shannah — Mon Jan 28, 2013 9:25 am

If you use the “order” directive in the fields.ini file it should be obeyed by the export_csv option:

e.g.

Code: Select all
`[myfield]
   order=2

[myfieldbefore]
    order=1`

Steve