MySQL error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

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

What am I doing wrong?

Doing this from phpMyAdmin works fine.

Thanks,
wes

···
Wessley Roche · Icon Designer · wessley@xxxxxxxxxxxx · www.iconizer.com
···

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux