I have an environment where there are two forms of login and tables "Users" and "Establishments", these tables are very similar and I need to return this query based on the email typed in the login form.
I'm trying to return by selecting directly on both tables, but it is not correct. ex:
SELECT * FROM {$tabelas->estabelecimentos} as estabelecimento, {$tabelas->usuarios} as usuario WHERE estabelecimento.email = %s OR usuario.email = %s LIMIT 1
But what I need is this: "Select from the table where e-mail=" mailbox stores "or"