I am having a problem with syntax errors in the following variable:
$uploadQuery = "
LOAD DATA LOCAL INFILE '".$docRoot."/../../includes/dbUploads/".$fileToUpload."'
INTO TABLE `promotions`
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\r\n'
";
I know that it has something do do with the escaping of the ' characters in the LOAD DATA... line. But I am stumped when it comes to what exactly the problem is, or how to reword this query in the correct manner.
So, My question is this:
How do i reword the stated variable in the correct manner, as to have no syntax errors relating to it.
If anyone has any suggestions or input with this, it would be greatly appreciated.
Thank You!