Hi,guys.I have some confusing on order priority of several column in same table.Let say i am using concat for my searching,
$search_keywords=strtolower($search);
$search_keywords = strip_tags($search_keywords);
$search_keywords = mysql_real_escape_string($search_keywords);
$replace_keywords = preg_replace("/[^a-zA-Z0-9:-\s]/", " ", trim($search_keywords));
$search_exploded = explode(" ",$replace_keywords); //get array keyword
$search_exploded = array_unique($search_exploded); //remove duplicate words
$x=0;
$construct2='';
$searchWords=array();
foreach($search_exploded as $search_each){
if(!in_array($search_each, $Filter['invalid_keyword'])&& strlen($search_each) > 2) {
$searchWords[]=$search_each;
$x++;
if ($x==1){
$construct2 .= "concat(titleFull, ' ', descFull, ' ', keywords) LIKE '%$search_each%'";
}
else{
$construct2 .= " OR concat(titleFull , ' ', descFull, ' ', keywords) LIKE '%$search_each%'";
}
so, i wanna ask how i count the occcurences keyword search order in each field (1.titleFull, 2.keywords , 3.descrpt).Can any guys give some idea or opinion on the concept counting priority?Thanks.