Hi all,
I have a link on my web site that intends to support the user generate a csv file of a table. But I have a problem that it generates the file onto the server - which is not the intention. Please help me to create one.
The code I have is
I have a link on my web site that intends to support the user generate a csv file of a table. But I have a problem that it generates the file onto the server - which is not the intention. Please help me to create one.
The code I have is
Code:
$query = "SELECT `Year of Data Entry` ". "INTO OUTFILE '/tmp/files/myfile.csv' " . "FIELDS TERMINATED BY ',' " . "ENCLOSED BY '\"' " . "LINES TERMINATED BY '\n' " . "FROM table1"; $result = mysql_query($query) or die(mysql_error()); Thanks in Advance
Comment