By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,262 Members | 2,664 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,262 IT Pros & Developers. It's quick & easy.

import Text file in MySQL table

P: 57

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


my table columns are: id,name,sal

May 11 '09 #1
Share this Question
Share on Google+
1 Reply

Expert 5K+
P: 6,050
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.
May 11 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.