$a = '
SELECT * FROM `'. $table .'` WHERE `chrDate` > "'. $lastDate .'" INTO OUTFILE "'. $file .'"
FIELDS TERMINATED BY ", " ENCLOSED BY \'"\' ESCAPED BY "\"
LINES TERMINATED BY "\n"
';
我不知道为什么我不能这样做,我尝试解决了好几次但每次我都给出这个错误:(
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 '\n"' at line 2
*回声$a *
SELECT * FROM `tbl_SaleApa` WHERE `chrDate` > "2001/03/29" INTO OUTFILE "C:/xampp/htdocs/transfer/tempfile/tbl_SaleApa.sql"
FIELDS TERMINATED BY ", " ENCLOSED BY '"' ESCAPED BY "\"
LINES TERMINATED BY "\n"