hi,
i have been trying to work out how to list all the users on the database for my website with a particular access level and also only the user id that the client is associated to however i end up with duplicated users.
here is my query so far
SELECT clients.ClientID, clients.ClientUserID, clients.AddedByUserID, users.UserID, users.FullName, users.AccessLevel
FROM users LEFT JOIN clients on users.UserID = clients.ClientUserID
WHERE users.AccessLevel = 1 or (clients.ClientUserID = users.UserID)and clients.ClientID = ParamClientID
clientUserID is the person who the client is assigned to.
access level 1 is admins where as the user whose client only has access level 2 so i only want the user whose client is to show in the drop down list.
can anyone shed any light on where i amgoing wrong?
thanks