I have a table with over a million rows. The PHP export script with headers and ajax that I normally use to create the user interface to export to csv, is not able to handle these many rows and times out. Hence looking for an alternative
After a fews days of digging I collated the below script from the internet, this downloads wonderfully but only to the local server > mysql folder
What I am looking for is to create a php mysql script so I can let users download large tables to csv's through the php user interface itself
SELECT 'a', 'b', 'c' UNION ALL SELECT a,b,c INTO OUTFILE '2026.csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' FROM table ;