Three table join?
I wasn't sure what I should have in the title :-P
I'm looking for a way to send an email to all customers that want an email for certain products.
I have three tables
email Address (text)
CustID -> Customers(ID)
Product name (text) <-values from another table
The story is this: I have customers that I want to send an email to. Some customers have some products that I want to contact them about from time to time. F.x. if an HP 8500 toner comes on sale I want to be able to email the customers that have bought that printer _if_ the email checkbox is checked.
The data would look like this:
Name "Splurge Inc."
email Address "firstname.lastname@example.org"
Product name "HP Color LaserJet 8500"
Subject "HP Color LaserJet 8500 toner sale"
Body "Foo bar"
What I don't understand is how I would perform a find from the Email table/database so that an email would only be sent for certain Customers (the one where SendEmail=1) and certain products