gpt4 book ai didi

php - 无法加载数据文件工作

转载 作者:行者123 更新时间:2023-11-30 00:50:41 24 4
gpt4 key购买 nike

这是我的加载数据脚本。我无法让它工作。有人知道我能做什么吗?谢谢!

$sql = "
LOAD DATA INFILE ".$theFile."
REPLACE INTO TABLE Product
FIELDS TERMINATED BY '|'
LINES TERMINATED BY '\n'
(archived_id_number, sku, name, upc, account_id, shippingBox_id, unit_cost, supplier_id, description, productLength, productWidth, productHeight)";

以下是我的 txt 文件的示例:

 43485|7850|Cool Circuits|630227078508|74||10.00|545||0.00|0.00|0.00
39682|7802|Light|630227078027|74||10.00|545||0.00|0.00|0.00

这是我收到的错误:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/home/hallow8/public_html/xxxx/scripts/productsNew2/data_science_wiz.txt' at line 1

最佳答案

您需要在路径周围加上引号

$sql = "
LOAD DATA INFILE '".$theFile."'
REPLACE INTO TABLE Product…

关于php - 无法加载数据文件工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21007032/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com