Re: MySQL Error 1366

From: Date: Tue, 29 May 2007 00:15:31 +0000
Subject: Re: MySQL Error 1366
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-43649@lists.php.net to get a copy of this message
elk dolk wrote:
Hi All, I want to load data from dump file to MySQL table using LOAD DATA INFILE but there is Error 1366 : mysql> LOAD DATA
    -> INFILE 'D:/SITE/SOMETABLE.SQL'
    -> INTO TABLE SOMETABLE
    -> FIELDS TERMINATED BY ','
    -> OPTIONALLY ENCLOSED BY ''
    -> LINES TERMINATED BY ')';
ERROR 1366 (HY000): Incorrect integer value: '--MySQL dump 10.10 -- --S' for column 'ID' at row 1
LOAD DATA INFILE imports a CSV like file, it can't contain create table statements or insert statements. See the documentation: http://dev.mysql.com/doc/refman/4.1/en/load-data.html If you have a script with create table & insert statements, use source:
source  (\.)    Execute a SQL script file. Takes a file name as an argument.
So \. filename -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.db (#43649) next »