You are here: Re: MySQL error « PHP « IT news, forums, messages
Re: MySQL error

Posted by Jasper Bryant-Greene on 07/01/05 13:22

Wessley Roche wrote:
> I'm having a problem with the following code:
>
> $sql = "LOAD DATA LOCAL INFILE '/path/to/file.txt' INTO TABLE `mytable`
> FIELDS TERMINATED BY '\t' ESCAPED BY '\' LINES TERMINATED BY '\n'";
> mysql_query($sql) or die('<br><br>'.mysql_error());
>
> I get this MySQL error:
> You have an error in your SQL syntax. Check the manual that corresponds
> to your MySQL server version for the right syntax to use near ''' at
> line 2

You're on the wrong list. You want the MySQL mailing list.

Just as a pointer, you probably want "ESCAPED BY '\''" rather than
"ESCAPED BY '\'" (added a ' to close the first quote, as the second one
is escaped.

Jasper

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация