Boy do I have a tough query. This one potentially uses four tables. The idea is that if data exists in another table not listed in this query, then I do not want to return the result.
SELECT DISTINCT i6invites.projectID, i6invites.id, i6projects.address, i6projects.city, i6projects.t_report_type, i6projects.t_date_needed, i6projects.loan_type, i6projects.loan_amount, i6projects.loan_purpose, i6projects.admins, i6users.handle
FROM i6invites, i6projects, i6users
WHERE i6invites.type = 1
AND i6invites.owner = i6projects.admins
AND i6invites.owner = i6users.id
Now, if another table called i6bidder has a row with a certain value say i6bidder.bidderid <> 44 then how can I get that value?
So, for simplistic sake, let's say that you have two tables and you want to get all of the rows from table 1 where an id does not exist on table 2.
Table 1 has two colums
id and owner
Table 2 has three colums id, bidder, and pid
You want to get all the records out of table 1 where table 2 pid = table 1 id