jalmz Posted January 7, 2013 Share Posted January 7, 2013 (edited) Hi guys, What is the best script or code to upload .txt file in mysql database? using php.. Thanks inside the text file.. and I would like to insert it n my existing database. "0202011328","Icore 3","3092.16","1/4/2013","Japan" "0101072497","Icore 4","80.57","1/14/2013","philippines" "0101020340","Amd athlon","2246.96","1/7/2013","USA" and the txt file consist 27 + of rows. thanks Edited January 7, 2013 by jalmz Quote Link to comment Share on other sites More sharing options...
haku Posted January 8, 2013 Share Posted January 8, 2013 What does your code look like? Quote Link to comment Share on other sites More sharing options...
Christian F. Posted January 8, 2013 Share Posted January 8, 2013 This looks to be a CSV file, which MySQL can import directly. That said, it does look like there are some normalization that should be done on the data first. Which means you'll need to read the CSV file, and parse the data, before inserting it into the relevant tables. What those tables are, depends upon what the actual fields represents. In any case, my answer is really more suited for the "Application design" forum, while your questions seems to be suited for the "Freelance" section (if you want someone to write the code for you). The PHP coding help section, which we're in now, is neither; It's for helping people with code they they have written, but are having troubles with. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.