$res = mysql_query("SELECT (size * downloads) FROM files_jpg ORDER BY date LIMIT 10");
$total1 = 0;
while ($row = mysql_fetch_array($res)) {
$total1 = $total1 + $row[0];
}
echo "total1";
$res = mysql_query("SELECT (size * downloads) FROM files_gif ORDER BY date LIMIT 10");
$total2 = 0;
while ($row = mysql_fetch_array($res)) {
$total2 = $total2 + $row[0];
}
echo "total2";
Now I want $total1 and $total2 to combine together and display the very latest 10 from the result of the two tables combination. Is that possible in this way or any other way?