SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist jkh1978's Avatar
    Join Date
    May 2001
    Location
    Northern Virginia
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    text file -> mysql

    I have a comma delimited file. I want to push this data into a mysql database. What is the easiest way to do this?

  2. #2
    SitePoint Evangelist
    Join Date
    Jul 2001
    Location
    UK
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Create a table schema with fields corresponding to the text file's 'fields'. Open the file and do some sort of string manipulation functions on it (in PHP, see the PHP forum). Put this 'parsed' info into an array, and then create and execute INSERT queries.

  3. #3
    SitePoint Evangelist jkh1978's Avatar
    Join Date
    May 2001
    Location
    Northern Virginia
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im just looking for an easier way... I'm feeling lazy today. I tried phpMyAdmin program, but it can't handle this huge file.


Bookmarks

Posting Permissions

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