Ash wrote:
I have a mysql table with about 1000 email addresses of our current clients. About 40 of whom have unsubscribed from our newsletter. I have another database that has 200 names and emails for another list we send to and I want to combine the two lists, but I want to make sure that the people who have unsubbed stay unsubbed. We are combining our emails to be just one email instead of 2 separate ones.

So here's what I have:

List 1
Name        Email            Unsubbed?
--------------------------------------------------
Name 1         [EMAIL PROTECTED]        N
Name 2        [EMAIL PROTECTED]    Y
Name 3        [EMAIL PROTECTED]    N
Name 4        [EMAIL PROTECTED]    N
.
.
.
Name 1000    [EMAIL PROTECTED]    N


List 2
Name        Email
---------------------------------------------------
First1        [EMAIL PROTECTED]
First2        [EMAIL PROTECTED]
first3        [EMAIL PROTECTED]
First4        [EMAIL PROTECTED]

I want the info from list 2 to be put into list 1 but save the unsubbed tag for those emails who are unsubbed in list 1. List 2 does not have an unsubbed field.

Any easy way to do it?

Ash


Yeah, it should be pretty simple:

INSERT INTO List1 (name, email, unsubbed) (SELECT name, email, 'N', FROM List2)

If you're worried about duplicates, that's pretty simple to avoid, too. Just say the word.

Ben

_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to