ozfactor Posted May 21, 2003 Share Posted May 21, 2003 I am trying to dump a list of email addresses into a mysql database called mail. The list is formatted like the following: [email protected] [email protected] How would I go about dumping this data to a \'sub_mail\' table with each email address auto incremented in the id field. Also I want the email field to hold the value of the emails and a field for header with a value of \'h\'? Thanks! Link to comment https://forums.phpfreaks.com/topic/493-mysql-dump-data-to/ Share on other sites More sharing options...
theverychap Posted May 22, 2003 Share Posted May 22, 2003 Hows your list of emails stored, in a plain text file? spreadsheet? let me know and we can build a little script (and a sql table of course)... Link to comment https://forums.phpfreaks.com/topic/493-mysql-dump-data-to/#findComment-1665 Share on other sites More sharing options...
shivabharat Posted May 22, 2003 Share Posted May 22, 2003 One thing u can do is create a css (comma seprated value) file which will conatain email,header and try this command LOAD DATA INFILE [b]file_name[/b] INTO TABLE [b]TABLE_NAME[/b] FIELDS TERMINATED BY \',\' LINES TERMINATED BY \'n\' Link to comment https://forums.phpfreaks.com/topic/493-mysql-dump-data-to/#findComment-1668 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.