<?php
$kw = $_REQUEST['txtKeyword'];
$strSQL = "SELECT
tb_k2_categories.id,tb_k2_items.id,tb_k2_categories.parent, tb_k2_items.catid, tb_k2_items.title, tb_k2_items.introtext,tb_k2_items.created
FROM tb_k2_items
left join tb_k2_categories ON tb_k2_items.catid = tb_k2_categories.id
WHERE tb_k2_categories.parent = 15 AND tb_k2_items.title LIKE '%".$kw."%'";
$strSQL .=" OR tb_k2_items.introtext LIKE '%".$kw."%'";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$Num_Rows = mysql_num_rows($objQuery);
//echo $strSQL;
//exit;
?>
ลองดูมันออกมาครับ แค่อยากให้ในฟิว title กับ introtext
<?php
$kw = $_REQUEST['txtKeyword'];
$strSQL = "SELECT
tb_k2_categories.id,tb_k2_items.id,tb_k2_categories.parent, tb_k2_items.catid, tb_k2_items.title, tb_k2_items.introtext,tb_k2_items.created
FROM tb_k2_items
left join tb_k2_categories ON tb_k2_items.catid = tb_k2_categories.id
WHERE tb_k2_categories.parent = 15 AND tb_k2_items.title LIKE '%".$kw."%'";
$strSQL .=" OR tb_k2_items.introtext LIKE '%".$kw."%'";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$Num_Rows = mysql_num_rows($objQuery);
//echo $strSQL;
//exit;
?>