I have a csv file which has 2 fields:
warehouse retailshop
-3 +3
-1 +1
+2 -2
The field warehouse needs to insert into table warehouse.
The field retailshop needs to insert into table retailshop.
So, one field is insert into one table.
but the load file only can insert into one table for all fields in the csv file.
How should I code that?
<?php
include "config.php";
LOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE 'testcsv.csv'
[REPLACE | IGNORE]
INTO TABLE testtable
[CHARACTER SET charset_name]
[{FIELDS | COLUMNS}
[TERMINATED BY 'string']
[[OPTIONALLY] ENCLOSED BY 'char']
[ESCAPED BY 'char']
]
[LINES
[STARTING BY 'string']
[TERMINATED BY 'string']
]
[IGNORE number LINES]
[(col_name_or_user_var,...)]
[SET col_name = expr,...]
?>