I'm currently struggling with a finishing writing a global login script.
Basically I have two tables of users, and want to create one login which will redirect the user dependent upon what userlevel they have.
What I am struggling with querying the two tables and returning a result. At first, I have tried using the OR operator however this returns 2 results when I know there is only 1 result.
Secondly I thought about using an INNER JOIN, but this would only work if there is a match across the two tables.
In effect there can only be one match in one of the tables. Does anyone have any ideas how I can overcome this?
SQL I am using at the moment is:
SELECT jobseeker.password, recruiter.password, recruiter.level FROM jobseeker INNER JOIN recruiter ON jobseeker.email = recruiter.email WHERE jobseeker.email = '".$email."'