Inserting a text file into a database table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bjacobs
    Junior Member
    • Mar 2004
    • 28

    #1

    Inserting a text file into a database table

    Ok, got a dumb question. I have a table in a databse that I need to upload about 200 entries. I would like to just use phpadmin to do this. I have 3 fields: word_id, word, replacement. word_id is auto_increment so I don't think it needs anything filled out on it.
    This is for a Christian phpbb board and am loading up a word censor file.

    Can someone give me the syntax of my text file to help me along?

    I guess I'm just not smart enough to figure this one out.
  • Frank Hagan
    Senior Member
    • Mar 2004
    • 724

    #2
    Check out this site: http://www.blue105.com/internet/supp...l_offline.html



    It appears the mySQL table uses comma delimited text files with the text in quotes. The first article above shows how to export the fields from ACCESS to make them have this format, but uses a .php page to do the actual import. The second is a forum where a person finally figured out how to format the text file and import it.

    I haven't done this, so I don't know how easy/hard it is to do with phpMyAdmin in CPanel. Hope this helps.

    Comment

    • Frank Hagan
      Senior Member
      • Mar 2004
      • 724

      #3
      Even better, a list of bad words already made into a SQL statement for import into the phpBB table:

      CAUTION: THIS LINK LEADS TO A LIST OF REALLY NAUGHTY WORDS. DO NOT ACCESS IF YOU ARE OFFENDED BY REALLY NAUGHTY WORDS OR IF YOUR EMPLOYER HAS A REALLY NAUGHTY WORD FILTER:



      I have to go now. HR wants to see me.

      Comment

      • bjacobs
        Junior Member
        • Mar 2004
        • 28

        #4
        I found a tutorial on how to do it finally on the phpbb forum. Once I read through it a few times, it worked with no problems.

        Thanks

        Comment

        Working...