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

前端 未结 6 1757
深忆病人
深忆病人 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:40

    Ok man, I wont write the code for you because you wont learn if I do. But I will point you in the right direction. Check out this link http://us.php.net/fgetcsv for information on parsing a CSV file in PHP. A simple google search should also give you the necessary information on entering it into a MySQL table.

提交回复
热议问题