Jump to content

export mysql data to a text file


boon_chong

Recommended Posts

when i run the code below, there is no text file come out, please help...

[code]<meta http-equiv="refresh" content="5">
<?
include("8_dbconnect.php");
$sql = ("SELECT distinct itemNo,itemDesc,proGroup,saleType,oriPrice,disc,netPrice,
qty,total,date,outlet INTO OUTFILE 'C:/123.txt' FIELDS TERMINATED BY '|' LINES TERMINATED BY '\\r\\n' FROM employee");
$mysql_result = mysql_query($query);

include("8_dbdisconnect.php");
 
?>[/code]
Link to comment
https://forums.phpfreaks.com/topic/31062-export-mysql-data-to-a-text-file/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.