I have something I'm am building. To make things simple to understand I will change it all to something everybody knows.
Let's say I have a website for farmers. One table called farmers_tbl with the fields farmer_id, farmer_name, farmer_product
I have one table with a lot of grocery stores that is called stores_tbl with the following fields: store_id, store_name, store_product
The farmers can send newsletters to all the stores that are selling their product.
So, if a farmer is selling eggs, he can send the newsletter to all stores that sell eggs.
PHP Code:
$sql = "SELECT * FROM stores_tbl, farmers_tbl WHERE store_product=farmer_product";
$result = mysql_query( $sql ) or die( mysql_error() );