Re: [PHP] Escaping nasty quotes

2003-07-31 Thread Matthew Vos
On Thu, 2003-07-31 at 14:31, Roy W wrote: > I have this: > > $query = "LOAD DATA LOCAL INFILE '/home/data.txt' INTO TABLE mytable FIELDS > TERMINATED BY ',' ENCLOSED BY '" . '"' . "' "; > $result = MYSQL_QUERY($query); > PRINT "$query2"; > > The query doesn't take ... but if I cut and paste the

RE: [PHP] Escaping nasty quotes

2003-07-31 Thread Jennifer Goodie
> I have this: > > $query = "LOAD DATA LOCAL INFILE '/home/data.txt' INTO TABLE > mytable FIELDS > TERMINATED BY ',' ENCLOSED BY '" . '"' . "' "; > $result = MYSQL_QUERY($query); > PRINT "$query2"; > > The query doesn't take ... but if I cut and paste the printed > response into > the mysql server

RE: [PHP] Escaping nasty quotes

2003-07-31 Thread Jay Blanchard
[snip] Unfortunately, they are indeed enclosed by double quotes [/snip] Can you show us a snippet of data.txt? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Escaping nasty quotes

2003-07-31 Thread Roy W
Unfortunately, they are indeed enclosed by double quotes Roy -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 12:58 PM To: Roy W; [EMAIL PROTECTED] Subject: RE: [PHP] Escaping nasty quotes [snip] Sorry...Because of the double quote near

RE: [PHP] Escaping nasty quotes

2003-07-31 Thread Jay Blanchard
[snip] Sorry...Because of the double quote near the ENCLOSED BY .. It delivers a PARSE ERROR $query = "LOAD DATA LOCAL INFILE '/home/data.txt' INTO TABLE mytable FIELDS TERMINATED BY ',' ENCLOSED BY '"' "; [/snip] Are the fields enclosed by a quote? If not... $query = "LOAD DATA LOCAL INFILE '/h

RE: [PHP] Escaping nasty quotes

2003-07-31 Thread Roy W
PROTECTED] Subject: Re: [PHP] Escaping nasty quotes --- Roy W <[EMAIL PROTECTED]> wrote: > The query doesn't take ... but if I cut and paste the printed response > into the mysql server manually ... works like a charm http://www.php.net/addslashes Chris = Become a better

RE: [PHP] Escaping nasty quotes

2003-07-31 Thread Roy W
Sorry...Because of the double quote near the ENCLOSED BY .. It delivers a PARSE ERROR ? -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 12:38 PM To: Roy W; [EMAIL PROTECTED] Subject: RE: [PHP] Escaping nasty quotes [snip] $query = "

Re: [PHP] Escaping nasty quotes

2003-07-31 Thread Chris Shiflett
--- Roy W <[EMAIL PROTECTED]> wrote: > The query doesn't take ... but if I cut and paste the printed > response into the mysql server manually ... works like a charm http://www.php.net/addslashes Chris = Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org

RE: [PHP] Escaping nasty quotes

2003-07-31 Thread Jay Blanchard
[snip] $query = "LOAD DATA LOCAL INFILE '/home/data.txt' INTO TABLE mytable FIELDS TERMINATED BY ',' ENCLOSED BY '" . '"' . "' "; {/snip] try ... $query = "LOAD DATA LOCAL INFILE '/home/data.txt' INTO TABLE mytable FIELDS TERMINATED BY ',' ENCLOSED BY '"' "; The period concats were not needed.