I have a script that sends emails to a contact list. I would like to filter the large list each time I send and wondered what would be the best way to store the temporary list?
I was thinking of creating a temporary table which contained the filtered results and then dropping it at the end of the script. Is there an easier way to store the results?
The contact list is in the the thousands.
Thanks for any advice.
I would agree with the use of a temporary table, but would also suggest independent views.
If you frequently filter your tables and need to create many temporary tables, why not create multiple views, which would contain results only for the criteria you wish, and sending mail based on that.
This would prevent the need for creating and dropping tables, but would only benefit you if you use the same filter many times.