Writing a PHP file to read from CSV and execute SQL Query

前端 未结 6 1718
深忆病人
深忆病人 2020-12-30 12:39

I would like a PHP script to read the contents from a CSV file in the following format

id, sku
1,104101
2,105213

there are a total of 1486

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-30 12:54

    Goblyn27 is correct. Take a look at fgetcsv() and mysql_query() on php.net. There are even examples in the docs for how to do this.

提交回复
热议问题