ok Posted September 12, 2008 Share Posted September 12, 2008 hi guys here are the codes (line 37) $query = "SELECT fname, lname, email, date_join INTO OUTFILE 'csv.txt' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' FROM csv"; mysql_query($query) or die("Problem with the query: $query on line " . __LINE__ . '<br>' . mysql_error()); here is the error Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/joealex3/public_html/convert2csv.php on line 37 Thank you! Link to comment https://forums.phpfreaks.com/topic/123886-can-you-spot-the-not/ Share on other sites More sharing options...
teng84 Posted September 12, 2008 Share Posted September 12, 2008 $query = "SELECT fname, lname, email, date_join INTO OUTFILE 'csv.txt' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\n' FROM csv"; mysql_query($query) or die("Problem with the query: $query on line " . __LINE__ . '<br>' . mysql_error()); Link to comment https://forums.phpfreaks.com/topic/123886-can-you-spot-the-not/#findComment-639580 Share on other sites More sharing options...
Mchl Posted September 12, 2008 Share Posted September 12, 2008 also LINES TERMINATED BY '\\n' Link to comment https://forums.phpfreaks.com/topic/123886-can-you-spot-the-not/#findComment-639581 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.