<?
mysql_query("SET NAMES UTF8");
$strSQL = "SELECT * FROM akhar2 where type = 'o' UNION
SELECT * FROM 90pee where type = 'o' UNION
SELECT * FROM prommongkol where type = 'o' UNION
SELECT * FROM mongkolapha where type = 'o' order by name ASC";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$Num_Rows = mysql_num_rows($objQuery);
?>
SELECT 'akhar2' tbname ,* FROM akhar2 where type = 'o' UNION
SELECT '90pee' ,* FROM 90pee where type = 'o' UNION
SELECT 'prommongkol',* FROM prommongkol where type = 'o' UNION
SELECT 'mongkolapha',* FROM mongkolapha where type = 'o' order by name ASC