【发布时间】:2014-07-11 21:09:37
【问题描述】:
我正在使用 PHP 执行此查询,但遇到语法错误,无法确定错误在哪里。我尝试在 SET 命令之间使用逗号或不使用逗号,但仍然出现此错误。有人可以帮我发现吗?我很抱歉,但我想不通,需要第二双眼睛。
Error during import: LOAD DATA INFILE '/zzz/tmp/php0saZKS' INTO TABLE TD16 FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\r\n' IGNORE 1 LINES (recid,creatorid,@createdate,groupid,fname,minitial,lname,morf,@dateofbirth,homephonenumber,dlnumber,ssnumber,occupation,hoursperweek,address1,city,state,zip,doh,annualsalary,planstartdate) SET createdate = STR_TO_DATE(@createdate, '%m/%d/%Y %H:%i'), SET dateofbirth = STR_TO_DATE(@dateofbirth, '%m/%d/%Y %H:%i');
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 'SET dateofbirth = STR_TO_DATE(@dateofbirth, '%m/%d/%Y %H:%i')' at line 1
【问题讨论】: