PDA

View Full Version : Mysql Data to .txt file


reefland
Sat 28th May '05, 9:10pm
Good day,

I am wanting to perform a mysql query (or two or three :D ) and have it passed to a .txt file which can be opened or downloaded by a user, just like what happens with the Download PM's as a TXT file function. Anyone know of a quick and easy way to do this?

Marco van Herwaarden
Sun 29th May '05, 5:31am
There is no standard function for this and it would require changing code. My advise is that you ask this at vbulletin.org.

You could also generate a serverside textfile with the following SQL-statement:

SELECT *
INTO OUTFILE '/tmp/result.text'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\r\n'
FROM table;Then let the client download that file.