I want the "pid" for each record in my "suspects" table where they are a prospect and they have not met with me yet, (in the "notes" table as notes.result !='Got Meeting'.)
I've tried this:
$sql = "SELECT DISTINCT notes.pid FROM notes, suspects where notes.pid = suspects.pid and notes.result != 'Got Meeting' and suspects.status = 'prospect' ORDER BY suspects.last_contact ASC"
This produces all my records who are prospects in the suspects table, but doesn't exclude records where I've met with them already. (notes.result != 'Got Meeting').
Can anyone tell me how to do this?