0
How to join these two SELECTS?
SELECT *
FROM doacao d
LEFT JOIN foto f ON (d.iddoacao = f.iddoacao)
WHERE (d.idbeneficiario IS NULL);
SELECT email
FROM doador dd
INNER JOIN doacao d ON (dd.iddoador = d.iddoador)
WHERE (dd.iddoador IS NOT NULL)
AND (d.idbeneficiario IS NULL);
Obs I need to call both select to play sql, I wanted to know how I do it, if I use Union?
– Tronos2
you want to display the two queries or unite(Union) them?
– rray
Open two tabs doesn’t solve the problem? I haven’t figured out what you want yet.
– rray
Merge them in select
– Tronos2
Standardize the fields of the two selects and use
UNION ALL
– Jéf Bueno
I’m trying here only it’s not working.
– Tronos2
I edited the question because "phpmyadmin" is not a "database", read this to understand the differences: What is the difference between mysql and phpmyadmin?
– Guilherme Nascimento