import Text file in MySQL table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Noorain
    New Member
    • Mar 2008
    • 57

    #1

    import Text file in MySQL table

    sir

    my data are in text file. i want import text file in mysql data to use php script. please help me.............

    my text file is

    1#AA#2,345.00
    2#BB#850.00
    3#CC#31,855.00

    my table columns are: id,name,sal

    thanks
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    Here are some resources for you: file() - reads contents of file into an array, you can then traverse this array using a loop; explode() - if the hash character '#' is the standard delimiter, explode() the data from file(), you will then have your three items to insert into the database.

    MySQL function reference / book.

    Note: we will not do the work for you.

    Comment

    Working...