I am running the following query but not receiving the results I would like
SELECT * FROM `test`.`sales_flat_order_grid`
WHERE `created_at` BETWEEN DATE_SUB(CURDATE(), INTERVAL 14 DAY)
AND CURDATE()
INTO OUTFILE '/tmp/sales.csv'
FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY 'n';
This query displays the results in one excel row and it does not contain the MySQL table headers. Any ideas on how to fix this query?
Thanks