I need to perform a search on two different tables and give echo
in the results separately! I think it would look something like this:
$consulta = "SELECT * FROM tabela1 T1 UNION (SELECT* FROM tabela2 T2)";
$con = mysqli_query ($db,$consulta);
while ($Dado = mysqli_fetch_array($con)) {
echo $DadosT1; // Aqui resultado da primeira tabela
echo $DadosT2; // Aqui resultado da segunda tabela
}
Can anyone clarify me if this is possible and how do I do it?