Jump to content


Photo

MySQL dump data to


  • Please log in to reply
2 replies to this topic

#1 ozfactor

ozfactor
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 21 May 2003 - 08:22 PM

I am trying to dump a list of email addresses into a mysql database called mail. The list is formatted like the following:

email1@domain.com
email2@domain.com

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!

#2 theverychap

theverychap
  • Staff Alumni
  • Advanced Member
  • 78 posts
  • LocationDevon, England

Posted 22 May 2003 - 08:47 AM

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

#3 shivabharat

shivabharat
  • Members
  • PipPipPip
  • Advanced Member
  • 371 posts
  • LocationChennai, India

Posted 22 May 2003 - 05:40 PM

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\'

Knowledge --- Reading Enriches Mind But Sharing Enhances It.[br][br]Note: Before you request help enusre that you have had a look at the tutorials @phpfreaks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users