Jump to content

Recommended Posts

I have a client who I am building a newsletter for and have a database built for the e-mail addresses, etc..The table has 4 fields (id,address,validate,nlid). The client sent me a loooonnnngggg list of addresses on notepad only seperated by a line break.

 

Is there an easy way to take this notepad file and insert the addresses into the table where column=address ?

 

Thanks in Advance

 

P.S.- there are 4 lists so for each list I insert the id is auto increment, address is from the lists, validate will = 1 and nlid will be 1,2,3, or 4 depending on the list I am inserting.

Link to comment
https://forums.phpfreaks.com/topic/72910-importing-data-for-field-from-text-file/
Share on other sites

Never done this before .....how do I go about setting the other columns on the fly ? I have looked it up (LOAD DATA LOCAL INFILE) but don't seem to be having any luck with it.

With which part? The refman page is quite detailed.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.