When I try using something like
$aSqlCommand = "SELECT ............. '\n'";
The quote continues on after the double quote, now that's probably because it's an escape character right? How can I change it so the quote will stop?
I want to use the LINES TERMINATED BY '\n' in it.
Full Query:
$sql2= "SELECT date,value,domain
INTO OUTFILE 'export1.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'";
From: How to output MySQL query results in CSV format? and http://www.tech-recipes.com/rx/1475/save-mysql-query-results-into-a-text-or-csv-file/