What is the best method to achieve this complex objective
Here is what I want to do:
1st- Look in various tables and get email records from each table based on the selection criteria - this is Done
2nd- Merge all these various email lists which have been returned by the many different MySQL selects into one master list. Note: all the select commands return 'email'
3rd- If the selection was made by the Admin that the email list should contain distinct emails only, then make sure that the list of emails are distinct. Keeping in mind that these emails are coming from many different tables.
Is there a MySQL or Php command(s) that can meet objectives 2 & 3?