I have 1 table consisting of email addresses which are subscribed to mailing lists. Each email can be subscribed to one or both lists. Each subscriber also belongs to one one of two organizations.
I need a way to sort the data for the user by either variable so that the user can display:
All members
All members subscribing to list A regardless of organization
All members subscribing to list B regardless of organization
All members of group 1 subscribing to either list
All members of group 1 subscribing to list A
All members of group 1 subscribing to list B
All members of group 2 subscribing to either list
All members of group 2 subscribing to list A
All members of group 2 subscribing to list B
There has to be a simpler way to do this than coding 9 separate queries.
I have a form drop down which captures user choices of which org and which list they want to display results for...three choices for each (wildcard, choice 1, choice 2).
I just can't wrap my head around how to take those two POST variables and plug them into a query and create all the above options.