I have two tables. One with login information logins
which holds password
column and one with emails emails
which holds email
column and loginID
column. I would like to use parameters on both tables. I would like to find row in emails where email=? and then take the corresponding login id inside that row and match this to a row in logins table. I would then like to match the password to the row in logins. A double separated where statement from two tables.
Something along the lines of:
$prepareTables=$listersDatabase->prepare("select*from emails where email=? left join logins on emails.loginID=logins.ID where password=?");
$prepareTables->execute(array("email@email.com","password123"));
Any help is appriciated