Please, i've been working on this for awhile and can't see what the problem is. Here is my code:
$db_name = "some_db";
$table_name = "some_table";
$connection = mysql_connect("xxx", "xxx", "xxx") or die("Couldn't connect.");
$db = mysql_select_db($db_name, $connection)or die("Couldn't select database.");
$sql = "SELECT * INTO OUTFILE '/path.../filename/test.txt'
FIELDS TERMINATED BY ','
LINES TERMINATED BY \"\n\"
FROM $table_name
";
$result = mysql_query($sql,$connection)or die("$sql");
I get no errors, the $sql statement is echoed back correctly but the file test.txt does not appear on the server in the directory filename. What am i doing wrong!!! please someone help me with this.
Thanks!