mysql - How Make a php array and insert it to db from CSV -
i have need upload data csv.my current code upload data correctly .but have need separate column data repeated
suppose
my csv column
company | area |red show type | red show name | red show price | green show type | green show name | green show price |
i want data in different table
one table have company | area | these 2 data
another table design is:
id|show_type|show_name|show_price
in csv
red show type | red show name | red show price | green show type | green show name | green show price |
these column contain same type of data 2 type of show red , green
now how can insert data database csv
try using explode php method using "|" delimeter.
after should sorting code using ifs , elses
Comments
Post a Comment