Currently I am using the following code:
$sql = sprintf("SELECT * FROM users WHERE email = '%s' and password = '%s'", $email, $password);
I want to accomplish the following:
$sql = sprintf("SELECT * FROM database1.users AND database2.users WHERE email = '%s' and password = '%s'", $email, $password);
I need to check for the possibility that a user exists in either table.
Any suggestions on how to handle this?
You can use a
UNIONto combine both queries: