Hi,
I have this mailinglist stored in a database, it is pretty simple with a structure like this:
id - unique id
emailadress - an emailadress
newsletterid- referer 'newsletter' table
'newsletter' table is used to describe the different newsletters
eg.
1. Agents
2. Employees
3. Genral
My task is to have all email adresses under Agents and Employees dublicated so these email adresses is also stored under General.
My idea is to create a simple script that goes something like this
- Selects all e mail adresses where newsletter id = 1(Agents)
- in a loop I insert emailadress into mailinglist with the newsletterid value = 3
- do this on Employees to.
After that clean up the mailinglist table, eg. remove duplicates etc., but that is another story.
Is there another way in eg. using MySQL only, that does this job more effectiv?
any thoughts anyone, hope I was clear enough ;-)
Thanks in advance,
Thomas A.