dannybrazil Posted June 20, 2011 Share Posted June 20, 2011 Hello, I have a list of 100 emails in a .txt file, and I wanted to UPLOAD them into a database, but each email into 1 row. e.g. TXT FILE [email protected],[email protected],[email protected],[email protected],[email protected] into DB row1-->[email protected] row2-->[email protected] ... row100-->[email protected] any help how to do so ? Quote Link to comment https://forums.phpfreaks.com/topic/239887-php-mysql-help-database/ Share on other sites More sharing options...
gristoi Posted June 20, 2011 Share Posted June 20, 2011 Mysql has a series of functions that allows you to puload and parse text docs. Try : LOAD DATA LOCAL INFILE '/path/to/yourfile.txt' INTO TABLE `yourtable` LINES TERMINATED BY ',' Quote Link to comment https://forums.phpfreaks.com/topic/239887-php-mysql-help-database/#findComment-1232217 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.