<?
if($_POST["ss"] != "")
{
// Search By Name or Email
$strSQL = "SELECT * FROM tb_news WHERE
(title_news_th LIKE '%".$_POST["ss"]."%' or
title_news_jp LIKE '%".$_POST["ss"]."%' or
detail_th LIKE '%".$_POST["ss"]."%'or
detail_jp LIKE '%".$_POST["ss"]."%' ) UNION
SELECT * FROM tb_breaking WHERE
(title_breaking_th LIKE '%".$_POST["ss"]."%' or
title_breaking_jp LIKE '%".$_POST["ss"]."%' or
detail_th LIKE '%".$_POST["ss"]."%'or
detail_jp LIKE '%".$_POST["ss"]."%' ) UNION
SELECT * FROM tb_people WHERE
(title_people_th LIKE '%".$_POST["ss"]."%' or
title_people_jp LIKE '%".$_POST["ss"]."%' or
detail_people_th LIKE '%".$_POST["ss"]."%'or
detail_people_jp LIKE '%".$_POST["ss"]."%' )";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
<?
while($objResult = mysql_fetch_array($objQuery))
{
echo $objResult[id_news];
echo $objResult[title_news_th];
echo "<br>";
}
?>
<?
}
?>