Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004

    Thumbs down Unanswered: UPDATE SET question


    I have a table with a text field, when using

    UPDATE database_name SET col_name=whatever;

    how do I load a local text file in place of whatever?


  2. #2
    Join Date
    Jul 2004
    Dundee, Scotland
    sounds like you need to read the csv file contents via a web page then insert into mysql.

    In the past I have used: @fgetcsv($fp, 1024, ",");

    that reads each line from the csv file into an array which acn be iterated through. MySQL insert queries then can be built and executed.

    alternatively a quick google search find this:

    Let me know if I've missed the point or if you'd like a further code sample.

    Matthew McNicol

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts