inserting data from text file (.txt) into mysql database/table

Discussion in 'Web Design and Development (archive)' started by brianellisrules, Jan 24, 2004.

  1. macrumors regular

    Joined:
    Oct 17, 2003
    #1
    Howdy.

    Using my new-found php/mysql skills, I'm modifying my counter to use a mysql database rather than a text file to track unique hits to my website.

    The way it currently works is that it checks the IP of the user against a list of IPs in a text file. If the IP isn't there, increment the counter and add the IP to the list. Otherwise, do nothing.

    I've modified it so it does all that using a mysql database (I EVEN WROTE A FUNCTION! WOOHOO!). Now I just need to transfer the data from the text file (over a thousand values) into the mysql database. If it was just a few lines, I'd do it manually via phpmyadmin, but that would take forever and a day for this case.

    Thanks!
     
  2. macrumors 6502a

    oingoboingo

    Joined:
    Jul 31, 2003
    Location:
    Sydney, Australia
    #2
  3. macrumors member

    Joined:
    Nov 13, 2003
    Location:
    Scotland
    #3
    Hi,
    I use Navicat for all my import/export data transfer in MySQL, you can get a 30 day trial, www.navicat.com

    It's available for OSX and also Windows.

    Essential application in my opinion!

    Cheers,

    Rick
     
  4. thread starter macrumors regular

    Joined:
    Oct 17, 2003
    #4
    Thanks for the responses. It turns out there's an option in phpmyadmin to upload data from a text file. Oops, sorry.
     

Share This Page