0
這段代碼在php文件中出現了什麼問題?MySql由雙引號括起
$q = "LOAD DATA LOCAL INFILE '$file' INTO TABLE $table FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\r\n' IGNORE 1 LINES" ;
echo "LOAD DATA query = " . $q . "<br />";
mysqli_query($DBlink, $q) or die (mysqli_error($DBlink));
它看起來像很多例子我見過,但是我得到的錯誤:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /users13/domains/efsowell.us/web/ed/JOCMemDB/CSV_MySQL.php on line 66
謝謝傑西卡!我以爲我嘗試了逃跑,但也許我認爲特殊的字符是雙打逃脫的。無論如何,'\''的作品! –