Question about LOAD DATA LOCAL INFILE in mysql

Discussion in 'PHP' started by dallvic, Aug 25, 2006.

  1. #1
    hi, I was trying to load some data into my database using LOAD DATA LOCAL INFILE

    the file has 4 lines, look like:

    aaa2,bbb2,jfdlk2 rd,2fu
    fda,fdsa,fdsa,fda
    rew, rew, yre, reqt
    ooo,ogggo,oogfgo,offooo

    I use mysql commands as:

    load data local infile 'data.txt' into table mydatabase
    -->fields terminated by ','
    -->lines terminated by '\n'
    -->(field1,field2,field3,field4);

    It says Query OK, 4 rows affected. after I ran it.

    But when I check the database, I noticed none of the first field is loaded except for the last line.

    Could you please help me take a look at it?

    Thanks.
     
    dallvic, Aug 25, 2006 IP