I have two tables (customers, admin) A user logs in by email and password, I need to check if either the email and password exists in the customer or admin table. The emails are unquie so won't have a problem there. This is for uni work, obviously I would have a better database design than this but I have to use what is given. I have this:
$email = $_POST['email'];
$password = $_POST['password'];
$sql = "SELECT * FROM customer, admin WHERE cus_email = '$email'
AND cus_password = '$password' OR admin_email = '$email' AND admin_password = '$password'";
Am not very good with Joins so I havent attempted one on this.
Thanks for any help :)