1
I wonder if there is a way to join 2 queries of different tables in a single query?
For example, in the code below I have 2 queries in separate tables. However, there is a way to perform these 2 queries as a single, at once, instead of having to do 2 variables and two separate queries?
$query1 = mysql_query("SELECT cod_empresa, razao_social FROM tbl_empresa ORDER by razao_social ASC") or die(mysql_error());
$query2 = mysql_query("SELECT cod_tipo, tipo_publicacao FROM tbl_tipo_publicacao by tipo_publicacao ASC") or die(mysql_error());
Behold: What’s the difference between UNION and UNION ALL?
– Marconi