Thanks for the replies , I got that working perfectly, now i have a new problem on a different project im doing:
I'm working on a password database that a superadmin can enter passwords and logins into and then grant individual users access to different ones....
The problem I'm stumped on is that in the users view they will see "passwords they have been approved for" , "passwords they have requested" and then I have a drop down box to "make a new request" for a new password....
The only thing is i dont want duplicate requests going into the database, so i need to exclude any rows that they already have access to or have already requested... almost like the opposite of what a regular left join would do....
Here are the tables in the DB:
USERS (list of all users and their passwords)
ID | user | pass
LOGINS (list of all the logins they can request or see)
ID2 | site | login | pass
ACCESS (Sets who has access to what)
ID3 | sid | uid | acc
SID = (site id) ID2 from logins table
UID = (user id) ID from users
ACC = 0 if they request, 1 if approved
So i basically need to join all 3 tables in the select and exclude $user anywhere his ID shows up in the ACCESS table, and display only SITE from LOGINS that are not in SID from ACCESS where UID = $user
Anyone know how to right that query? 😕