Hi, thanks for viewing this. I have a db that has users, roles & user_roles. What I am trying to achieve is a login that will select users who have Admin or Associate permissions. The login then uses name and password to permit access.
My SQL syntax thus far is -
SELECT * FROM users
LEFT JOIN ON user_roles
ON user.id=user_roles.userid AND roleid IN (Administrator, Associate)
WHERE username = '$username' AND password = '$password'";
I am not sure where I am going wrong.
Thanks in advance for your help.