Exporting data from a MySQL table to a CSV file
Posted: Tue Aug 17, 2004 2:20 am
Hello,
I want to export some data from a MySQL table to a CSV file using OUTFILE.
Output:
--------
Unallowed Query: Access denied for user: 'pma@localhost' (Using password: YES)
Folder /logfiles has following rights drwxrwxrwx.
=> What is the error? How do I get it running?
Thanks
I want to export some data from a MySQL table to a CSV file using OUTFILE.
Code: Select all
<?php
include_once "modules/mod_datenbank.php";
$db = dbconnect();
$query = mysql_query("SELECT idLink, dbLink
FROM links
WHERE dbFlag = '1'
INTO OUTFILE '/opt/lampp/htdocs/tarazi/phpcrawler/development/logfiles/data.txt'
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n' ") or die ("Ungültige Abfrage: " . mysql_error());
$result = mysql_query($query);
?>Output:
--------
Unallowed Query: Access denied for user: 'pma@localhost' (Using password: YES)
Folder /logfiles has following rights drwxrwxrwx.
=> What is the error? How do I get it running?
Thanks