
- You are not logged in. | Login
November 17, 2006 7:07 am
- napkdd1
- Member


php parse error
Hi,
Could someone help me figure out why I get the a parse error when running this MySQL query?
Here is the statement getting an parse error
$readdata = "LOAD DATA INFILE 'customer1.csv' INTO TABLE 'customer1' FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\r\n'";
Thanks!
November 17, 2006 4:27 pm
- phppat
- Member


Re: php parse error
Easy fix, you've got a " within your " quoted variable that should be escaped by a slash.. try this instead:
$readdata = "LOAD DATA INFILE 'customer1.csv' INTO TABLE 'customer1' FIELDS TERMINATED BY ',' ENCLOSED BY '\"' ESCAPED BY '\\' LINES TERMINATED BY '\r\n'";
Hope that helps!
PHP monster


