Answer the question
In order to leave comments, you need to log in
Why might the export of records from the database to Excel not work?
The site needs to implement an export from the database to Excel. There are over 2,000,000 entries in the database. The problem is that when more than 1,000 records are selected, the script stops working (everything works through ajax requests and simply nothing is returned back).
There is a suggestion that this may be related to the time the script is running on the server, but solving a similar problem using set_time_limit() does not help.
Can you please tell me what is causing this and how can I solve this problem?
Answer the question
In order to leave comments, you need to log in
first you need to do the export through - SELECT ... INTO OUTFILE
If the column names are static, then write well in front
SELECT назст1 , назвст2, назвст3
UNION
)
SELECT nazv1, nazv2,nazv3 INTO OUTFILE file.csv FIELDS TERMINATED BY ',' ENCLOSED BY '"'
LINES TERMINATED BY '\r\n'
)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question