I\'ve written a big sql script that creates a CSV file. I want to call a cronjob every night to create a fresh CSV file and have it available on the website.
old question.. but there is an option OVERWRITE ON that you can add to the statement
SELECT * INTO OUTFILE '/home/sites/example.com/www/files/backup.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n' OVERWRITE ON
...