简体   繁体   中英

Import CSV to mysql database with a cell containing multiple values separated with commas

I have a csv file with 2 cells ProductId and Product Images. Here the Id would be unique but Product Image cell can have more than one image url separated by commas like image1.jpg,image2,jpg etc.

Here when I am trying to import this file into mysql database then only image1.jpg is being added in the ProductImage field of database table and the next image url ie image2.jpg is being added onto id column of the next entry.

Please suggest how can I solve this by having all image urls on a same column in database table.

Surround 2.nd column with ""
.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM