Hi
I’m not sure if i was clear enough, but a example, let’s say you have 3 file structure like this
first example
CSV 1
col1, col2, col3
data, data, data
CSV 2
col2, col1, col3
data, data, data
CSV 3
col3, col1, col3
data, data, data
in database
col1, col2, col3
With this structure example I have no problem to import even columns are in different order, as you can see above, but, if name of columns are mixed as below it problem to import if not match column in database. First example below no problem but CSV 2 and CSV 3 will be problem to import because column not matching column in database.
Second example
CSV 1
col1, col2, col3
data, data, data
CSV 2
aaa, bbb, ccc
data, data, data
CSV 3
ddd, eee, fff
data, data, data
Or can this still be done somehow with php anyway? Some example would be nice. I run 1 file at time automatic in a script but if column name in some CSV file its not same as I have in database then data from this file will messed up in database column. Only file in this example that will works will be CSV 1, and files in first example