Need some help with query

Data from 2 Tables MySQL

Posted 09 September 2009 - 11:15 PM

I'm trying to automatically populate members into a newsletter script. There are two groups NFL and College.
DATABASE 1 is from a joomla website where users are subscribed to different plans. I need to get the names and email from these users and enter them into either the NFL newsletter, College Football newsletter, or both based on their plan_id.

(Pictures included)

Basically I need a 2 different queries for 2 different databases.
1. To get name and email from DATABASE1 based on data from 2 tables.
2. To insert name and email into 2 separate groups in DATABASE2

I need to get the names and emails of all users from TABLE1, and who have A under status column and divide them into two groups based on which plain_id they have from TABLE2.