Hi all,
Newbie here
Can someone help me with this. I am trying to export a table from a mysql database and save it to a csv file on my local drive. The code seems to run without a problem but I cant see a file called exported_data.txt anywhere and the system is not asking me to save or open the file.
/ */
$F = fopen('exported_data.txt' , 'w'); // open for write
$delim = "\t"; // set delim, eg tab
$res = mysql_query("SELECT * FROM users_users");
if ( ! $res )
die ( "<H3>There has been a problem and the query failed - Please contact the System Administrator. Thank you</H3>");
while ($row = mysql_fetch_row($res)) {
fwrite($F, join($delim, $row) . "\n");
}
fclose($F);
All help appreciated
Tim