[UPHPU] Update a mysql table.
Ben Reece
breece at doba.com
Tue Jun 24 14:14:39 MDT 2008
Ash wrote:
>>
>> 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.
>
> Yah, duplicates too. :D
>
> Ash
INSERT INTO List1 (name, email, unsubbed) (SELECT name, email, 'N' FROM
List2 LEFT JOIN List1 ON List2.email = List1.email WHERE List1.email IS
NULL)
That should prevent it from inserting any email address from List2
that's already in List1.
More information about the UPHPU
mailing list