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
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
May 11 '09 #1
Share this Question
Share on Google+
1 Reply


Markus
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.