I'm a bit stuck with something I've been asked to do...
First off, this database is poorly designed so it probably breaks every rule in the book!
I have a table full of email addresses with the following fields
Email_Table
------------
ID
email
name
list_name
this is where it gets tricky, each email address can appear several times distinguished only by the list_name field.
I need to copy all records that have a list_name value of A,B,C and D to a new list_name value of X at the same time making sure there are no duplicated email addresses with a list_name of X
I've been bending my brain around this for a while now and I'm just not experienced enough with SQL or PHP can someone help??
Thanks in advance
First off, this database is poorly designed so it probably breaks every rule in the book!
I have a table full of email addresses with the following fields
Email_Table
------------
ID
name
list_name
this is where it gets tricky, each email address can appear several times distinguished only by the list_name field.
I need to copy all records that have a list_name value of A,B,C and D to a new list_name value of X at the same time making sure there are no duplicated email addresses with a list_name of X
I've been bending my brain around this for a while now and I'm just not experienced enough with SQL or PHP can someone help??
Thanks in advance