1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

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.
    SEMrush
    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
    SEMrush