I have 2 different tables that each have a column called id_product. How can I get the DISTINCT values of id_field across both tables?
tb_compare
-id_product
tb_product_field
-id_product
-id_field
$qasql1 = mysql_query("SELECT c1.*,
c2.DISTINCT(id_field) FROM tb_compare AS c1
INNER JOIN tb_product_field AS c2 ON c1.id_product=c2.id_product
WHERE c1.compareSession = '$sessionID' ORDER BY c1.compareID Desc "
);
Thanks!!