How to load a text file into a table column using mysql

Discussion in 'PHP' started by jacka, Sep 23, 2008.

  1. #1
    Hi
    I am trying to import simple text files into a table, one column at a time.
    I have imported the first one using:

    insert into tpins(part_number)   select  * from temptpins1;
    Code (markup):
    which it did do fine.

    Now I wish to import a second file into the second column of same table. stating from row one again.
    I have found that I may have to use "load data " command, such as :

    load data infile 'temptpins0d' into table tpins (Ød);
    Code (markup):
    but it gives me this error "Access denied for user 'XXX'(using password yes).

    The text file is also a table with one column, in the server.
    How can I copy this column of data into tpins's second column table starting from row1 (i.e no insert)
    Thx in advance
     
    jacka, Sep 23, 2008 IP
  2. jacka

    jacka Peon

    Messages:
    165
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi
    I thought I make the problem a little clearer.
    What I am really trying to do is copy the first row of column a from table a into first row of table b in column b. repeat until all data copied.
    the only thing that needs bearing in mind is that there are already data in column a of table b.

    Hope this has made it clearer.
    thx:confused::confused:
     
    jacka, Sep 23, 2008 IP
  3. chathura87

    chathura87 Peon

    Messages:
    60
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Anyone knows what is the way to get a email to mysql database without anyone user interaction
    Subject, sender email is there in a table and without opening email (lets say gmail) i should be able to get those data to my mysql table
     
    chathura87, Sep 23, 2008 IP
  4. Funk-woo10

    Funk-woo10 Peon

    Messages:
    1,108
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #4
    are you sure your connecting to the right place with the correct username and pass ?

    i.e localhost, username, password ?

    Double check these are correct ?
     
    Funk-woo10, Sep 23, 2008 IP