$objConnect = mysql_connect("localhost","root","123456") or die("Error Connect to Database");
$objDB = mysql_select_db("muslim");
$strSQL = "SELECT * FROM activity AS a LEFT JOIN member AS b ON(a.mem_id=b.mem_id) where Calen_id ='$Id'";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$Num_Rows = mysql_num_rows($objQuery);
$objConnect = mysql_connect("localhost","root","123456") or die("Error Connect to Database");
$objDB = mysql_select_db("muslim");
$strSQL = "SELECT * FROM activity AS a LEFT JOIN member AS b ON(a.mem_id=b.mem_id) where Calen_id ='$Id'";
$strSQL .= " AND เงือนไขการค้นหา";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$Num_Rows = mysql_num_rows($objQuery);
$strSQL = "SELECT * FROM activity AS a LEFT JOIN member AS b ON(a.mem_id=b.mem_id) where Calen_id ='$Id'";
if($_POST["Search2"] != "" and $_POST["txtKeyword"] != '')
{
$strSQL.=" AND (".$_POST["Search2"]." LIKE '%".$_POST["txtKeyword"]."%' ) ";
}